diff --git a/testdir-234221/helm/untitled-appStack-126cabe4/Chart.yaml b/testdir-234221/helm/untitled-appStack-126cabe4/Chart.yaml new file mode 100644 index 0000000..5c46b1d --- /dev/null +++ b/testdir-234221/helm/untitled-appStack-126cabe4/Chart.yaml @@ -0,0 +1,7 @@ +apiVersion: v2 +appVersion: 1.0.0 +description: Generated helm chart created for service "untitled-appStack-126cabe4" + with stackgen +name: untitled-appStack-126cabe4 +type: application +version: 0.1.0 diff --git a/testdir-234221/helm/untitled-appStack-126cabe4/README.md b/testdir-234221/helm/untitled-appStack-126cabe4/README.md new file mode 100644 index 0000000..97383f4 --- /dev/null +++ b/testdir-234221/helm/untitled-appStack-126cabe4/README.md @@ -0,0 +1,13 @@ +# [StackGen](stackgen.com) generated IaC + +Below are the instructions to get started with the generated IaC + +## Install Helm Chart + +1. Before installing the included helm chart, please make sure the ~/.kube/config points to the cluster you want to use. +2. Update the helm-chart/values.yaml as required. +3. Generated charts and dependent sub-charts for the AppStack can be installed to your cluster by running - + +``` +sh install-chart.sh +``` diff --git a/testdir-234221/helm/untitled-appStack-126cabe4/install-chart.sh b/testdir-234221/helm/untitled-appStack-126cabe4/install-chart.sh new file mode 100644 index 0000000..32b5a2a --- /dev/null +++ b/testdir-234221/helm/untitled-appStack-126cabe4/install-chart.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Exit on any failure +set -e + +HELM_CHART_DIR="." +RELEASE_NAME=${1} + +if [ -z "${RELEASE_NAME}" ]; then + echo "Usage: install-chart.sh " + exit 1 +fi + +# Add bitnami repo +helm repo add bitnami https://charts.bitnami.com/bitnami + +# Build helm dependencies +helm dependency build ${HELM_CHART_DIR} + +# Install chart +helm upgrade --install ${RELEASE_NAME} ${HELM_CHART_DIR} -f ${HELM_CHART_DIR}/values.yaml --render-subchart-notes diff --git a/testdir-234221/helm/untitled-appStack-126cabe4/values.yaml b/testdir-234221/helm/untitled-appStack-126cabe4/values.yaml new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/testdir-234221/helm/untitled-appStack-126cabe4/values.yaml @@ -0,0 +1 @@ +{} diff --git a/testdir-234221/terraform/.gitignore b/testdir-234221/terraform/.gitignore new file mode 100644 index 0000000..05b2a76 --- /dev/null +++ b/testdir-234221/terraform/.gitignore @@ -0,0 +1,32 @@ +# Source: https://github.com/github/gitignore/blob/main/Terraform.gitignore +# Local .terraform directories +**/.terraform/* + +# .tfstate files +*.tfstate +*.tfstate.* + +# Crash log files +crash.log +crash.*.log + +# Ignore override files as they are usually used to override resources locally and so +# are not checked in +override.tf +override.tf.json +*_override.tf +*_override.tf.json + +# Ignore transient lock info files created by terraform apply +.terraform.tfstate.lock.info + +# Include override files you do wish to add to version control using negated pattern +# !example_override.tf + +# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan +# example: *tfplan* + +# Ignore CLI configuration files +.terraformrc +terraform.rc + diff --git a/testdir-234221/terraform/.metadata b/testdir-234221/terraform/.metadata new file mode 100644 index 0000000..bd34454 --- /dev/null +++ b/testdir-234221/terraform/.metadata @@ -0,0 +1,7 @@ +{ + "app_stack_name": "untitled-appStack-126cabe4", + "iac_type": "Terraform", + "provider": "aws", + "multi_env": false, + "exporter": "terraform" +} \ No newline at end of file diff --git a/testdir-234221/terraform/README.md b/testdir-234221/terraform/README.md new file mode 100644 index 0000000..8890d04 --- /dev/null +++ b/testdir-234221/terraform/README.md @@ -0,0 +1,3 @@ +# README +This is a readme file for IaC generated with StackGen. +You can modify your appStack -> [here](http://cloud.stackgen.com/appstacks/1d0b82dc-064d-45fe-a58f-d8195704c280) diff --git a/testdir-234221/terraform/main.tf b/testdir-234221/terraform/main.tf new file mode 100644 index 0000000..48c0f15 --- /dev/null +++ b/testdir-234221/terraform/main.tf @@ -0,0 +1,243 @@ +module "stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32" { + source = "./modules/data_aws_ami" + executable_users = null + include_deprecated = false + most_recent = true + name_regex = null + owners = ["amazon"] +} + +module "stackgen_2b90e357-27b2-5bc1-a194-3d49ab34b057" { + source = "./modules/aws_s3_bucket" + bucket = "example-dev-bucket-83994" + force_destroy = false + object_lock_enabled = false + tags = null +} + +module "stackgen_4cccbd16-30a4-5461-b8bc-3a82f5e8fc3c" { + source = "./modules/aws_subnet" + availability_zone = "eu-west-2c" + cidr_block = "10.0.1.0/24" + map_public_ip_on_launch = false + tags = { + Name = "public-subnet-0" + } + vpc_id = module.stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897.id +} + +module "stackgen_7edf1d48-153c-5ecb-b82a-263c1fb7f1b3" { + source = "./modules/aws_instance" + ami = "ami-0561ca6a3f5ce98d7" + associate_public_ip_address = false + availability_zone = "eu-west-2c" + capacity_reservation_specification = [{ + capacity_reservation_preference = "open" + capacity_reservation_target = [] + }] + cpu_options = [{ + amd_sev_snp = "" + core_count = 1 + threads_per_core = 1 + }] + credit_specification = [{ + cpu_credits = "standard" + }] + disable_api_stop = false + disable_api_termination = false + ebs_block_device = [] + ebs_optimized = false + enable_primary_ipv6 = null + enclave_options = [{ + enabled = false + }] + ephemeral_block_device = [] + get_password_data = false + hibernation = false + host_id = "" + host_resource_group_arn = null + iam_instance_profile = "" + instance_initiated_shutdown_behavior = "stop" + instance_market_options = [] + instance_type = "t2.micro" + ipv6_address_count = 0 + ipv6_addresses = [] + key_name = "my-key" + launch_template = [] + maintenance_options = [{ + auto_recovery = "default" + }] + metadata_options = [{ + http_endpoint = "disabled" + http_protocol_ipv6 = "disabled" + http_put_response_hop_limit = 1 + http_tokens = "required" + instance_metadata_tags = "disabled" + }] + monitoring = true + network_interface = [] + placement_group = "" + placement_partition_number = 0 + private_dns_name_options = [{ + enable_resource_name_dns_a_record = false + enable_resource_name_dns_aaaa_record = false + hostname_type = "ip-name" + }] + private_ip = "10.0.1.87" + root_block_device = [{ + delete_on_termination = true + encrypted = false + iops = 100 + kms_key_id = "" + tags = {} + throughput = 0 + volume_size = 8 + volume_type = "gp2" + }] + secondary_private_ips = [] + security_groups = [] + source_dest_check = true + subnet_id = module.stackgen_4cccbd16-30a4-5461-b8bc-3a82f5e8fc3c.id + tags = { + Environment = "dev" + Name = "example-ec2" + } + tenancy = "default" + timeouts = null + user_data = null + user_data_base64 = null + user_data_replace_on_change = false + volume_tags = {} + vpc_security_group_ids = ["sg-03a421f711f5b3954"] +} + +module "stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897" { + source = "./modules/aws_vpc" + cidr_block = "10.0.0.0/16" + enable_dns_hostnames = false + enable_dns_support = true + enable_network_address_usage_metrics = false + instance_tenancy = "default" + tags = { + Name = "testvpc2382" + } +} + +module "stackgen_b814f8b2-25ff-5e10-8114-0e2b5fbd6f7f" { + source = "./modules/aws_subnet" + availability_zone = "eu-west-2c" + cidr_block = "10.0.2.0/24" + map_public_ip_on_launch = false + tags = { + Name = "public-subnet-1" + } + vpc_id = module.stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897.id +} + +module "stackgen_dfc6c5ff-6f5d-502a-816a-61592b3b12d4" { + source = "./modules/aws_subnet" + availability_zone = "eu-west-2c" + cidr_block = "10.0.4.0/24" + map_public_ip_on_launch = false + tags = { + Name = "private-subnet-1" + } + vpc_id = module.stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897.id +} + +module "stackgen_e637515a-f2e2-5f78-95b7-1968fa8e30e7" { + source = "./modules/aws_subnet" + availability_zone = "eu-west-2c" + cidr_block = "10.0.3.0/24" + map_public_ip_on_launch = false + tags = { + Name = "private-subnet-0" + } + vpc_id = module.stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897.id +} + +module "stackgen_eba2b836-92ab-5adb-825b-a9bea5fcfedb" { + source = "./modules/aws_instance" + ami = "ami-0561ca6a3f5ce98d7" + associate_public_ip_address = false + availability_zone = "eu-west-2c" + capacity_reservation_specification = [{ + capacity_reservation_preference = "open" + capacity_reservation_target = [] + }] + cpu_options = [{ + amd_sev_snp = "" + core_count = 1 + threads_per_core = 1 + }] + credit_specification = [{ + cpu_credits = "standard" + }] + disable_api_stop = false + disable_api_termination = false + ebs_block_device = [] + ebs_optimized = false + enable_primary_ipv6 = null + enclave_options = [{ + enabled = false + }] + ephemeral_block_device = [] + get_password_data = false + hibernation = false + host_id = "" + host_resource_group_arn = null + iam_instance_profile = "" + instance_initiated_shutdown_behavior = "stop" + instance_market_options = [] + instance_type = "t2.micro" + ipv6_address_count = 0 + ipv6_addresses = [] + key_name = "my-key" + launch_template = [] + maintenance_options = [{ + auto_recovery = "default" + }] + metadata_options = [{ + http_endpoint = "disabled" + http_protocol_ipv6 = "disabled" + http_put_response_hop_limit = 1 + http_tokens = "required" + instance_metadata_tags = "disabled" + }] + monitoring = true + network_interface = [] + placement_group = "" + placement_partition_number = 0 + private_dns_name_options = [{ + enable_resource_name_dns_a_record = false + enable_resource_name_dns_aaaa_record = false + hostname_type = "ip-name" + }] + private_ip = "10.0.2.44" + root_block_device = [{ + delete_on_termination = true + encrypted = false + iops = 100 + kms_key_id = "" + tags = {} + throughput = 0 + volume_size = 8 + volume_type = "gp2" + }] + secondary_private_ips = [] + security_groups = [] + source_dest_check = true + subnet_id = module.stackgen_b814f8b2-25ff-5e10-8114-0e2b5fbd6f7f.id + tags = { + Environment = "dev" + Name = "example-ec2" + } + tenancy = "default" + timeouts = null + user_data = null + user_data_base64 = null + user_data_replace_on_change = false + volume_tags = {} + vpc_security_group_ids = ["sg-03a421f711f5b3954"] +} + diff --git a/testdir-234221/terraform/modules/aws_instance/aws_instance.tf b/testdir-234221/terraform/modules/aws_instance/aws_instance.tf new file mode 100644 index 0000000..5dadf64 --- /dev/null +++ b/testdir-234221/terraform/modules/aws_instance/aws_instance.tf @@ -0,0 +1,184 @@ +resource "aws_instance" "this" { + ami = var.ami + associate_public_ip_address = var.associate_public_ip_address + availability_zone = var.availability_zone + disable_api_stop = var.disable_api_stop + disable_api_termination = var.disable_api_termination + ebs_optimized = var.ebs_optimized + get_password_data = var.get_password_data + hibernation = var.hibernation + host_id = var.host_id + host_resource_group_arn = var.host_resource_group_arn + iam_instance_profile = var.iam_instance_profile + instance_initiated_shutdown_behavior = var.instance_initiated_shutdown_behavior + instance_type = var.instance_type + ipv6_address_count = var.ipv6_address_count == 0 ? null : var.ipv6_address_count + ipv6_addresses = var.ipv6_addresses == [] ? null : var.ipv6_addresses + key_name = var.key_name + monitoring = var.monitoring + placement_group = var.placement_group + placement_partition_number = var.placement_partition_number + private_ip = var.private_ip + secondary_private_ips = var.secondary_private_ips + security_groups = var.security_groups + source_dest_check = var.source_dest_check + subnet_id = var.subnet_id + tags = var.tags + tenancy = var.tenancy + user_data = length(var.launch_template) == 0 ? var.user_data : null + user_data_base64 = length(var.launch_template) == 0 ? var.user_data_base64 : null + user_data_replace_on_change = var.user_data_replace_on_change + volume_tags = var.volume_tags + vpc_security_group_ids = var.vpc_security_group_ids + enable_primary_ipv6 = var.enable_primary_ipv6 + + dynamic "capacity_reservation_specification" { + for_each = var.capacity_reservation_specification + content { + capacity_reservation_preference = capacity_reservation_specification.value.capacity_reservation_preference + + dynamic "capacity_reservation_target" { + for_each = capacity_reservation_specification.value.capacity_reservation_target + content { + capacity_reservation_id = capacity_reservation_target.value.capacity_reservation_target.value.capacity_reservation_id + capacity_reservation_resource_group_arn = capacity_reservation_target.value.capacity_reservation_target.value.capacity_reservation_resource_group_arn + } + } + } + } + + dynamic "cpu_options" { + for_each = var.cpu_options + content { + amd_sev_snp = cpu_options.value.amd_sev_snp == "" ? null : cpu_options.value.amd_sev_snp + core_count = cpu_options.value.core_count + threads_per_core = cpu_options.value.threads_per_core + } + } + + dynamic "credit_specification" { + for_each = var.credit_specification + content { + cpu_credits = credit_specification.value.cpu_credits + } + } + + dynamic "ebs_block_device" { + for_each = var.ebs_block_device != null ? var.ebs_block_device : [] + content { + delete_on_termination = ebs_block_device.value.delete_on_termination + device_name = ebs_block_device.value.device_name + encrypted = ebs_block_device.value.encrypted + iops = ebs_block_device.value.iops + kms_key_id = ebs_block_device.value.kms_key_id + snapshot_id = ebs_block_device.value.snapshot_id + tags = ebs_block_device.value.tags + throughput = ebs_block_device.value.throughput + volume_size = ebs_block_device.value.volume_size + volume_type = ebs_block_device.value.volume_type + } + } + + dynamic "enclave_options" { + for_each = var.enclave_options + content { + enabled = enclave_options.value.enabled + } + } + + dynamic "ephemeral_block_device" { + for_each = var.ephemeral_block_device != null ? var.ephemeral_block_device : [] + content { + device_name = ephemeral_block_device.value.device_name + no_device = ephemeral_block_device.value.no_device + virtual_name = ephemeral_block_device.value.virtual_name + } + } + + dynamic "instance_market_options" { + for_each = var.instance_market_options + content { + market_type = instance_market_options.value.market_type + + dynamic "spot_options" { + for_each = instance_market_options.value.spot_options + content { + instance_interruption_behavior = spot_options.value.instance_interruption_behavior + max_price = spot_options.value.max_price + spot_instance_type = spot_options.value.spot_instance_type + valid_until = spot_options.value.valid_until == "" ? null : spot_options.value.valid_until + } + } + } + } + + dynamic "launch_template" { + for_each = var.launch_template + content { + id = launch_template.value.id == "" ? null : launch_template.value.id + name = launch_template.value.id != "" ? null : launch_template.value.name == "" ? null : launch_template.value.name + version = launch_template.value.version == "" ? null : launch_template.value.version + } + } + + dynamic "maintenance_options" { + for_each = var.maintenance_options + content { + auto_recovery = maintenance_options.value.auto_recovery + } + } + + dynamic "metadata_options" { + for_each = var.metadata_options + content { + http_endpoint = metadata_options.value.http_endpoint + http_protocol_ipv6 = metadata_options.value.http_protocol_ipv6 + http_put_response_hop_limit = metadata_options.value.http_put_response_hop_limit + http_tokens = metadata_options.value.http_tokens + instance_metadata_tags = metadata_options.value.instance_metadata_tags + } + } + + dynamic "network_interface" { + for_each = var.network_interface + content { + delete_on_termination = false + device_index = network_interface.value.device_index + network_card_index = network_interface.value.network_card_index + network_interface_id = network_interface.value.network_interface_id + } + } + + dynamic "private_dns_name_options" { + for_each = var.private_dns_name_options + content { + enable_resource_name_dns_aaaa_record = private_dns_name_options.value.enable_resource_name_dns_aaaa_record + enable_resource_name_dns_a_record = private_dns_name_options.value.enable_resource_name_dns_a_record + hostname_type = private_dns_name_options.value.hostname_type == "" ? null : private_dns_name_options.value.hostname_type + } + } + + dynamic "root_block_device" { + for_each = var.root_block_device + content { + delete_on_termination = root_block_device.value.delete_on_termination + encrypted = root_block_device.value.encrypted + iops = root_block_device.value.iops + kms_key_id = root_block_device.value.kms_key_id + tags = root_block_device.value.tags + throughput = root_block_device.value.throughput + volume_size = root_block_device.value.volume_size + volume_type = root_block_device.value.volume_type + } + } + + dynamic "timeouts" { + for_each = var.timeouts != null ? [var.timeouts] : [] + content { + create = lookup(timeouts.value, "create", null) + delete = lookup(timeouts.value, "delete", null) + update = lookup(timeouts.value, "update", null) + } + } +} + diff --git a/testdir-234221/terraform/modules/aws_instance/outputs.tf.json b/testdir-234221/terraform/modules/aws_instance/outputs.tf.json new file mode 100644 index 0000000..075443e --- /dev/null +++ b/testdir-234221/terraform/modules/aws_instance/outputs.tf.json @@ -0,0 +1,14 @@ +{ + "output": { + "arn": { + "description": "ARN of the instance", + "sensitive": false, + "value": "${aws_instance.this.arn}" + }, + "id": { + "description": "The value of the id output", + "sensitive": false, + "value": "${aws_instance.this.id}" + } + } +} \ No newline at end of file diff --git a/testdir-234221/terraform/modules/aws_instance/variables.tf.json b/testdir-234221/terraform/modules/aws_instance/variables.tf.json new file mode 100644 index 0000000..e13e34b --- /dev/null +++ b/testdir-234221/terraform/modules/aws_instance/variables.tf.json @@ -0,0 +1,332 @@ +{ + "variable": { + "ami": [ + { + "type": "string", + "description": "AMI to use for the instance. Required unless `Launch Template` is specified and the `Launch Template` specifes an AMI. If an AMI is specified in the `Launch Template`, setting `ami` will override the AMI specified in the `Launch Template`.", + "nullable": true + } + ], + "associate_public_ip_address": [ + { + "type": "bool", + "description": "Whether to associate a public IP address with an instance in a VPC.", + "default": false, + "nullable": true + } + ], + "availability_zone": [ + { + "type": "string", + "description": "AZ to start the instance in.", + "nullable": true + } + ], + "capacity_reservation_specification": [ + { + "type": "list(object({capacity_reservation_preference: string, capacity_reservation_target: list(object({capacity_reservation_id: string, capacity_reservation_resource_group_arn: string}))}))", + "description": "Describes an instance's Capacity Reservation targeting option.", + "nullable": true + } + ], + "cpu_options": [ + { + "type": "list(object({amd_sev_snp: string, core_count: number, threads_per_core: number}))", + "description": "The CPU options for the instance.", + "nullable": true + } + ], + "credit_specification": [ + { + "type": "list(object({cpu_credits: string}))", + "description": "Configuration block for customizing the credit specification of the instance.Terraform will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.", + "nullable": true + } + ], + "disable_api_stop": [ + { + "type": "bool", + "description": "If true, enables EC2 Instance Stop Protection.", + "nullable": true + } + ], + "disable_api_termination": [ + { + "type": "bool", + "description": "If true, enables EC2 Instance Termination Protection.", + "nullable": true + } + ], + "ebs_block_device": [ + { + "type": "list(object({delete_on_termination: bool, device_name: string, encrypted: bool, iops: number, kms_key_id: string, snapshot_id: string, tags: map(string), throughput: number, volume_size: number, volume_type: string}))", + "description": "One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation.", + "nullable": true + } + ], + "ebs_optimized": [ + { + "type": "bool", + "description": "If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it.", + "nullable": true + } + ], + "enclave_options": [ + { + "type": "list(object({enabled: bool}))", + "description": "Enable Nitro Enclaves on launched instances.", + "nullable": true + } + ], + "ephemeral_block_device": [ + { + "type": "list(object({device_name: string, no_device: string, virtual_name: string}))", + "description": "One or more configuration blocks to customize Ephemeral (also known as \"Instance Store\") volumes on the instance.", + "nullable": true + } + ], + "get_password_data": [ + { + "type": "bool", + "description": "If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows.", + "nullable": true + } + ], + "hibernation": [ + { + "type": "bool", + "description": "f true, the launched EC2 instance will support hibernation.", + "nullable": true + } + ], + "host_id": [ + { + "type": "string", + "description": "ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.", + "nullable": true + } + ], + "host_resource_group_arn": [ + { + "type": "string", + "description": "ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.", + "nullable": true + } + ], + "iam_instance_profile": [ + { + "type": "string", + "description": "IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably `iam:PassRole`.", + "nullable": true + } + ], + "instance_initiated_shutdown_behavior": [ + { + "type": "string", + "description": "Shutdown behavior for the instance.", + "nullable": true + } + ], + "instance_market_options": [ + { + "type": "list(object({market_type: optional(string), spot_options: list(object({block_duration_minutes: optional(number), instance_interruption_behavior: string, max_price: string, spot_instance_type: string, valid_until: optional(string)}))}))", + "description": "Describes the market (purchasing) option for the instances.", + "nullable": true + } + ], + "instance_type": [ + { + "type": "string", + "description": "Instance type to use for the instance. Required unless `Launch Template` is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting `Instance Type` will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.", + "nullable": true + } + ], + "ipv6_address_count": [ + { + "type": "number", + "description": "Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.", + "nullable": true + } + ], + "ipv6_addresses": [ + { + "type": "list(string)", + "description": "Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface", + "nullable": true + } + ], + "key_name": [ + { + "type": "string", + "description": "Key name of the Key Pair to use for the instance; which can be managed using the `Key Pair` resource.", + "nullable": true + } + ], + "launch_template": [ + { + "type": "list(object({id: string, name: string, version: string}))", + "description": "Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template.", + "nullable": true + } + ], + "maintenance_options": [ + { + "type": "list(object({auto_recovery: string}))", + "description": "Maintenance and recovery options for the instance.", + "nullable": true + } + ], + "metadata_options": [ + { + "type": "list(object({http_endpoint: string, http_protocol_ipv6: optional(string), http_put_response_hop_limit: number, http_tokens: string, instance_metadata_tags: string}))", + "description": "Customize the metadata options of the instance.", + "default": [], + "nullable": true + } + ], + "monitoring": [ + { + "type": "bool", + "description": "If true, the launched EC2 instance will have detailed monitoring enabled.", + "default": true, + "nullable": true + } + ], + "network_interface": [ + { + "type": "list(object({device_index: number, network_card_index: number, network_interface_id: string}))", + "description": "Customize network interfaces to be attached at instance boot time.", + "nullable": true + } + ], + "placement_group": [ + { + "type": "string", + "description": "Placement Group to start the instance in.", + "nullable": true + } + ], + "placement_partition_number": [ + { + "type": "number", + "description": "Number of the partition the instance is in. Valid only if the `AWS Placement Group` resource's `Strategy` argument is set to \"partition\"", + "nullable": true + } + ], + "private_dns_name_options": [ + { + "type": "list(object({enable_resource_name_dns_aaaa_record: bool, enable_resource_name_dns_a_record: bool, hostname_type: string}))", + "description": "Options for the instance hostname. The default values are inherited from the subnet.", + "nullable": true + } + ], + "private_ip": [ + { + "type": "string", + "description": "Private IP address to associate with the instance in a VPC.", + "nullable": true + } + ], + "root_block_device": [ + { + "type": "list(object({delete_on_termination: bool, encrypted: bool, iops: string, kms_key_id: string, tags: map(string), throughput: string, volume_size: number, volume_type: string}))", + "description": "Configuration block to customize details about the root block device of the instance.", + "nullable": true + } + ], + "secondary_private_ips": [ + { + "type": "list(string)", + "description": "List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a `Network Interface` block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.", + "nullable": true + } + ], + "security_groups": [ + { + "type": "list(string)", + "description": "List of security group names to associate with.", + "nullable": true + } + ], + "source_dest_check": [ + { + "type": "bool", + "description": "Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs.", + "default": true, + "nullable": true + } + ], + "subnet_id": [ + { + "type": "string", + "description": "VPC Subnet ID to launch in.", + "nullable": true + } + ], + "tags": [ + { + "type": "map(string)", + "description": "Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.", + "default": {}, + "nullable": true + } + ], + "tenancy": [ + { + "type": "string", + "description": "Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command.", + "nullable": true + } + ], + "timeouts": [ + { + "description": "A map of timeouts for the transit gateway.", + "nullable": true, + "type": "object({ create: optional(string), delete: optional(string), update: optional(string) })" + } + ], + "user_data": [ + { + "type": "string", + "description": "User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `User Data Base64` instead.", + "nullable": true + } + ], + "user_data_base64": [ + { + "type": "string", + "description": "Can be used instead of `User Data` to pass base64-encoded binary data directly. Use this instead of `User Data` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.", + "nullable": true + } + ], + "user_data_replace_on_change": [ + { + "type": "bool", + "description": "When used in combination with `User Data` or `User Data Base64` will trigger a destroy and recreate when set to true.", + "default": false, + "nullable": true + } + ], + "volume_tags": [ + { + "type": "map(string)", + "description": "Map of tags to assign, at instance-creation time, to root and EBS volumes.", + "nullable": true + } + ], + "vpc_security_group_ids": [ + { + "type": "list(string)", + "description": "List of security group IDs to associate with.", + "nullable": true + } + ], + "enable_primary_ipv6": [ + { + "type": "bool", + "description": "Whether to enable primary IPv6 on the instance.", + "nullable": true + } + ] + } +} diff --git a/testdir-234221/terraform/modules/aws_s3_bucket/aws_s3_bucket.tf b/testdir-234221/terraform/modules/aws_s3_bucket/aws_s3_bucket.tf new file mode 100644 index 0000000..e5d35e4 --- /dev/null +++ b/testdir-234221/terraform/modules/aws_s3_bucket/aws_s3_bucket.tf @@ -0,0 +1,10 @@ +resource "aws_s3_bucket" "this" { + bucket = var.bucket + force_destroy = var.force_destroy + object_lock_enabled = var.object_lock_enabled + tags = var.tags +} + + + + diff --git a/testdir-234221/terraform/modules/aws_s3_bucket/outputs.tf.json b/testdir-234221/terraform/modules/aws_s3_bucket/outputs.tf.json new file mode 100644 index 0000000..b1db45e --- /dev/null +++ b/testdir-234221/terraform/modules/aws_s3_bucket/outputs.tf.json @@ -0,0 +1,19 @@ +{ + "output": { + "arn": { + "description": "The value of the arn output", + "sensitive": false, + "value": "${aws_s3_bucket.this.arn}" + }, + "bucket": { + "description": "The value of the bucket output", + "sensitive": false, + "value": "${aws_s3_bucket.this.bucket}" + }, + "id": { + "description": "The value of the id output", + "sensitive": false, + "value": "${aws_s3_bucket.this.id}" + } + } +} \ No newline at end of file diff --git a/testdir-234221/terraform/modules/aws_s3_bucket/variables.tf.json b/testdir-234221/terraform/modules/aws_s3_bucket/variables.tf.json new file mode 100644 index 0000000..d81483d --- /dev/null +++ b/testdir-234221/terraform/modules/aws_s3_bucket/variables.tf.json @@ -0,0 +1,36 @@ +{ + "variable": { + "bucket": [ + { + "default": "", + "description": "The name of the S3 bucket", + "type": "string", + "nullable": true + } + ], + "force_destroy": [ + { + "default": false, + "description": "Indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.", + "type": "bool", + "nullable": true + } + ], + "object_lock_enabled": [ + { + "default": false, + "description": "Enable object locking for this bucket. Object lock allows you to store objects using a write once, read many (WORM) model.", + "type": "bool", + "nullable": true + } + ], + "tags": [ + { + "default": {}, + "description": "A mapping of AWS tags to assign to the bucket.", + "type": "map(string)", + "nullable": true + } + ] + } +} \ No newline at end of file diff --git a/testdir-234221/terraform/modules/aws_subnet/aws_subnet.tf b/testdir-234221/terraform/modules/aws_subnet/aws_subnet.tf new file mode 100644 index 0000000..443708b --- /dev/null +++ b/testdir-234221/terraform/modules/aws_subnet/aws_subnet.tf @@ -0,0 +1,9 @@ +resource "aws_subnet" "this" { + vpc_id = var.vpc_id + availability_zone = var.availability_zone + cidr_block = var.cidr_block + map_public_ip_on_launch = var.map_public_ip_on_launch + + tags = var.tags + +} diff --git a/testdir-234221/terraform/modules/aws_subnet/outputs.tf.json b/testdir-234221/terraform/modules/aws_subnet/outputs.tf.json new file mode 100644 index 0000000..53e901f --- /dev/null +++ b/testdir-234221/terraform/modules/aws_subnet/outputs.tf.json @@ -0,0 +1,14 @@ +{ + "output": { + "arn": { + "description": "The value of the arn output", + "sensitive": false, + "value": "${aws_subnet.this.arn}" + }, + "id": { + "description": "The value of the id output", + "sensitive": false, + "value": "${aws_subnet.this.id}" + } + } +} \ No newline at end of file diff --git a/testdir-234221/terraform/modules/aws_subnet/variables.tf.json b/testdir-234221/terraform/modules/aws_subnet/variables.tf.json new file mode 100644 index 0000000..cf9f712 --- /dev/null +++ b/testdir-234221/terraform/modules/aws_subnet/variables.tf.json @@ -0,0 +1,40 @@ +{ + "variable": { + "vpc_id": [ + { + "description": "The VPC ID", + "type": "string", + "nullable": false + } + ], + "cidr_block": [ + { + "description": "The CIDR block for the subnet", + "type": "string", + "nullable": true + } + ], + "availability_zone": [ + { + "description": "The availability zone", + "type": "string", + "nullable": true + } + ], + "tags": [ + { + "description": "The tags to apply to the subnet", + "type": "map(string)", + "nullable": true + } + ], + "map_public_ip_on_launch":[ + { + "description": "Specify true to indicate that instances launched into the subnet should be assigned a public IP address.", + "type": "bool", + "nullable": true, + "default": false + } + ] + } +} \ No newline at end of file diff --git a/testdir-234221/terraform/modules/aws_vpc/aws_vpc.tf b/testdir-234221/terraform/modules/aws_vpc/aws_vpc.tf new file mode 100644 index 0000000..ce66b21 --- /dev/null +++ b/testdir-234221/terraform/modules/aws_vpc/aws_vpc.tf @@ -0,0 +1,8 @@ +resource "aws_vpc" "this" { + cidr_block = var.cidr_block + instance_tenancy = var.instance_tenancy + enable_dns_support = var.enable_dns_support + enable_dns_hostnames = var.enable_dns_hostnames + enable_network_address_usage_metrics = var.enable_network_address_usage_metrics + tags = var.tags +} diff --git a/testdir-234221/terraform/modules/aws_vpc/outputs.tf.json b/testdir-234221/terraform/modules/aws_vpc/outputs.tf.json new file mode 100644 index 0000000..d36b0d9 --- /dev/null +++ b/testdir-234221/terraform/modules/aws_vpc/outputs.tf.json @@ -0,0 +1,24 @@ +{ + "output": { + "arn": { + "description": "The value of the arn output", + "sensitive": false, + "value": "${aws_vpc.this.arn}" + }, + "default_route_table_id": { + "description": "The value of the default_route_table_id output", + "sensitive": false, + "value": "${aws_vpc.this.default_route_table_id}" + }, + "id": { + "description": "The value of the id output", + "sensitive": false, + "value": "${aws_vpc.this.id}" + }, + "vpc_id": { + "description": "The value of the vpc_id output", + "sensitive": false, + "value": "${aws_vpc.this.id}" + } + } +} \ No newline at end of file diff --git a/testdir-234221/terraform/modules/aws_vpc/variables.tf.json b/testdir-234221/terraform/modules/aws_vpc/variables.tf.json new file mode 100644 index 0000000..f8fb561 --- /dev/null +++ b/testdir-234221/terraform/modules/aws_vpc/variables.tf.json @@ -0,0 +1,47 @@ +{ + "variable": { + "cidr_block": [ + { + "description": "The IPv4 CIDR block for the VPC.", + "nullable": false, + "type": "string" + } + ], + "instance_tenancy": [ + { + "description": "The IPv4 CIDR block for the VPC.", + "default": "default", + "type": "string" + } + ], + "enable_dns_support": [ + { + "description": "A boolean flag to enable/disable DNS support in the VPC.", + "default": true, + "type": "bool" + } + ], + "enable_network_address_usage_metrics": [ + { + "description": "Indicates whether Network Address Usage metrics are enabled for your VPC.", + "default": false, + "type": "bool" + } + ], + "enable_dns_hostnames": [ + { + "description": "A boolean flag to enable/disable DNS hostnames in the VPC.", + "default": false, + "type": "bool" + } + ], + "tags": [ + { + "description": "The tags to apply to the subnet", + "type": "map(string)", + "nullable": true, + "default": {} + } + ] + } +} diff --git a/testdir-234221/terraform/modules/data_aws_ami/data_aws_ami.tf b/testdir-234221/terraform/modules/data_aws_ami/data_aws_ami.tf new file mode 100644 index 0000000..b4b0f52 --- /dev/null +++ b/testdir-234221/terraform/modules/data_aws_ami/data_aws_ami.tf @@ -0,0 +1,8 @@ +data "aws_ami" "this" { + + executable_users = var.executable_users + include_deprecated = var.include_deprecated + most_recent = var.most_recent + name_regex = var.name_regex + owners = var.owners +} diff --git a/testdir-234221/terraform/modules/data_aws_ami/outputs.tf.json b/testdir-234221/terraform/modules/data_aws_ami/outputs.tf.json new file mode 100644 index 0000000..038e9ef --- /dev/null +++ b/testdir-234221/terraform/modules/data_aws_ami/outputs.tf.json @@ -0,0 +1,169 @@ +{ + "output": { + "architecture": { + "description": "The CPU architecture of the AMI, such as x86_64 or arm64.", + "sensitive": false, + "value": "${data.aws_ami.this.architecture}" + }, + "arn": { + "description": "The Amazon Resource Name (ARN) of the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.arn}" + }, + "block_device_mappings": { + "description": "Details about the block device mappings of the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.block_device_mappings}" + }, + "boot_mode": { + "description": "The boot mode of the AMI, such as legacy BIOS or UEFI.", + "sensitive": false, + "value": "${data.aws_ami.this.boot_mode}" + }, + "creation_date": { + "description": "The date and time when the AMI was created.", + "sensitive": false, + "value": "${data.aws_ami.this.creation_date}" + }, + "deprecation_time": { + "description": "The date and time when the AMI will be deprecated.", + "sensitive": false, + "value": "${data.aws_ami.this.deprecation_time}" + }, + "description": { + "description": "A description of the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.description}" + }, + "ena_support": { + "description": "Indicates whether enhanced networking with ENA is enabled.", + "sensitive": false, + "value": "${data.aws_ami.this.ena_support}" + }, + "hypervisor": { + "description": "The hypervisor type of the AMI, such as xen or nitro.", + "sensitive": false, + "value": "${data.aws_ami.this.hypervisor}" + }, + "id": { + "description": "The unique identifier of the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.id}" + }, + "image_id": { + "description": "The ID of the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.image_id}" + }, + "image_location": { + "description": "The location of the AMI within Amazon EC2.", + "sensitive": false, + "value": "${data.aws_ami.this.image_location}" + }, + "image_owner_alias": { + "description": "The alias of the owner of the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.image_owner_alias}" + }, + "image_type": { + "description": "The type of the AMI, such as machine or kernel.", + "sensitive": false, + "value": "${data.aws_ami.this.image_type}" + }, + "imds_support": { + "description": "Indicates whether Instance Metadata Service (IMDS) support is enabled.", + "sensitive": false, + "value": "${data.aws_ami.this.imds_support}" + }, + "kernel_id": { + "description": "The kernel ID associated with the AMI, if applicable.", + "sensitive": false, + "value": "${data.aws_ami.this.kernel_id}" + }, + "name": { + "description": "The name of the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.name}" + }, + "owner_id": { + "description": "The AWS account ID of the owner of the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.owner_id}" + }, + "platform": { + "description": "The platform of the AMI, such as Windows.", + "sensitive": false, + "value": "${data.aws_ami.this.platform}" + }, + "platform_details": { + "description": "Additional details about the platform of the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.platform_details}" + }, + "product_codes": { + "description": "The product codes associated with the AMI, if applicable.", + "sensitive": false, + "value": "${data.aws_ami.this.product_codes}" + }, + "public": { + "description": "Indicates whether the AMI is publicly available.", + "sensitive": false, + "value": "${data.aws_ami.this.public}" + }, + "ramdisk_id": { + "description": "The RAM disk ID associated with the AMI, if applicable.", + "sensitive": false, + "value": "${data.aws_ami.this.ramdisk_id}" + }, + "root_device_name": { + "description": "The name of the root device for the AMI instance.", + "sensitive": false, + "value": "${data.aws_ami.this.root_device_name}" + }, + "root_device_type": { + "description": "The type of root device used by the AMI, such as ebs or instance-store.", + "sensitive": false, + "value": "${data.aws_ami.this.root_device_type}" + }, + "root_snapshot_id": { + "description": "The snapshot ID of the root device of the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.root_snapshot_id}" + }, + "sriov_net_support": { + "description": "Indicates whether enhanced networking with SR-IOV is supported.", + "sensitive": false, + "value": "${data.aws_ami.this.sriov_net_support}" + }, + "state": { + "description": "The current state of the AMI, such as available or pending.", + "sensitive": false, + "value": "${data.aws_ami.this.state}" + }, + "state_reason": { + "description": "The reason for the current state of the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.state_reason}" + }, + "tags": { + "description": "The tags associated with the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.tags}" + }, + "tpm_support": { + "description": "Indicates whether TPM support is enabled for the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.tpm_support}" + }, + "usage_operation": { + "description": "The operation associated with the usage of the AMI.", + "sensitive": false, + "value": "${data.aws_ami.this.usage_operation}" + }, + "virtualization_type": { + "description": "The type of virtualization used by the AMI, such as hvm or paravirtual.", + "sensitive": false, + "value": "${data.aws_ami.this.virtualization_type}" + } + } +} \ No newline at end of file diff --git a/testdir-234221/terraform/modules/data_aws_ami/variables.tf.json b/testdir-234221/terraform/modules/data_aws_ami/variables.tf.json new file mode 100644 index 0000000..205d076 --- /dev/null +++ b/testdir-234221/terraform/modules/data_aws_ami/variables.tf.json @@ -0,0 +1,39 @@ +{ + "variable": { + "executable_users": [ + { + "description": "A list of users who are allowed to launch the AMI.", + "nullable": true, + "type": "list(string)" + } + ], + "include_deprecated": [ + { + "description": "Indicates whether to include deprecated AMIs in the search.", + "nullable": true, + "type": "bool" + } + ], + "most_recent": [ + { + "description": "If true, selects the most recent version of the AMI.", + "nullable": true, + "type": "bool" + } + ], + "name_regex": [ + { + "description": "A regular expression to filter AMI names.", + "nullable": true, + "type": "string" + } + ], + "owners": [ + { + "description": "A list of AWS account IDs that own the AMIs.", + "nullable": true, + "type": "list(string)" + } + ] + } +} \ No newline at end of file diff --git a/testdir-234221/terraform/moves.tf b/testdir-234221/terraform/moves.tf new file mode 100644 index 0000000..887ebed --- /dev/null +++ b/testdir-234221/terraform/moves.tf @@ -0,0 +1,45 @@ +moved { + from = module.ec2.aws_instance.main[0] + to = module.stackgen_7edf1d48-153c-5ecb-b82a-263c1fb7f1b3.aws_instance.this +} + +moved { + from = module.vpc.aws_subnet.private[1] + to = module.stackgen_dfc6c5ff-6f5d-502a-816a-61592b3b12d4.aws_subnet.this +} + +moved { + from = module.vpc.aws_vpc.main + to = module.stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897.aws_vpc.this +} + +moved { + from = module.ec2.aws_instance.main[1] + to = module.stackgen_eba2b836-92ab-5adb-825b-a9bea5fcfedb.aws_instance.this +} + +moved { + from = module.s3.aws_s3_bucket.main + to = module.stackgen_2b90e357-27b2-5bc1-a194-3d49ab34b057.aws_s3_bucket.this +} + +moved { + from = module.vpc.aws_subnet.public[0] + to = module.stackgen_4cccbd16-30a4-5461-b8bc-3a82f5e8fc3c.aws_subnet.this +} + +moved { + from = module.vpc.aws_subnet.private[0] + to = module.stackgen_e637515a-f2e2-5f78-95b7-1968fa8e30e7.aws_subnet.this +} + +moved { + from = module.vpc.aws_subnet.public[1] + to = module.stackgen_b814f8b2-25ff-5e10-8114-0e2b5fbd6f7f.aws_subnet.this +} + +moved { + from = module.ec2.aws_ami.amazon_linux + to = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.aws_ami.this +} + diff --git a/testdir-234221/terraform/outputs.tf b/testdir-234221/terraform/outputs.tf new file mode 100644 index 0000000..d27ee2f --- /dev/null +++ b/testdir-234221/terraform/outputs.tf @@ -0,0 +1,260 @@ +output "aws_instance_stackgen_7edf1d48-153c-5ecb-b82a-263c1fb7f1b3_arn" { + value = module.stackgen_7edf1d48-153c-5ecb-b82a-263c1fb7f1b3.arn + sensitive = false +} + +output "aws_instance_stackgen_7edf1d48-153c-5ecb-b82a-263c1fb7f1b3_id" { + value = module.stackgen_7edf1d48-153c-5ecb-b82a-263c1fb7f1b3.id + sensitive = false +} + +output "aws_instance_stackgen_eba2b836-92ab-5adb-825b-a9bea5fcfedb_arn" { + value = module.stackgen_eba2b836-92ab-5adb-825b-a9bea5fcfedb.arn + sensitive = false +} + +output "aws_instance_stackgen_eba2b836-92ab-5adb-825b-a9bea5fcfedb_id" { + value = module.stackgen_eba2b836-92ab-5adb-825b-a9bea5fcfedb.id + sensitive = false +} + +output "aws_s3_bucket_stackgen_2b90e357-27b2-5bc1-a194-3d49ab34b057_arn" { + value = module.stackgen_2b90e357-27b2-5bc1-a194-3d49ab34b057.arn + sensitive = false +} + +output "aws_s3_bucket_stackgen_2b90e357-27b2-5bc1-a194-3d49ab34b057_bucket" { + value = module.stackgen_2b90e357-27b2-5bc1-a194-3d49ab34b057.bucket + sensitive = false +} + +output "aws_s3_bucket_stackgen_2b90e357-27b2-5bc1-a194-3d49ab34b057_id" { + value = module.stackgen_2b90e357-27b2-5bc1-a194-3d49ab34b057.id + sensitive = false +} + +output "aws_subnet_stackgen_dfc6c5ff-6f5d-502a-816a-61592b3b12d4_arn" { + value = module.stackgen_dfc6c5ff-6f5d-502a-816a-61592b3b12d4.arn + sensitive = false +} + +output "aws_subnet_stackgen_dfc6c5ff-6f5d-502a-816a-61592b3b12d4_id" { + value = module.stackgen_dfc6c5ff-6f5d-502a-816a-61592b3b12d4.id + sensitive = false +} + +output "aws_subnet_stackgen_4cccbd16-30a4-5461-b8bc-3a82f5e8fc3c_arn" { + value = module.stackgen_4cccbd16-30a4-5461-b8bc-3a82f5e8fc3c.arn + sensitive = false +} + +output "aws_subnet_stackgen_4cccbd16-30a4-5461-b8bc-3a82f5e8fc3c_id" { + value = module.stackgen_4cccbd16-30a4-5461-b8bc-3a82f5e8fc3c.id + sensitive = false +} + +output "aws_subnet_stackgen_e637515a-f2e2-5f78-95b7-1968fa8e30e7_arn" { + value = module.stackgen_e637515a-f2e2-5f78-95b7-1968fa8e30e7.arn + sensitive = false +} + +output "aws_subnet_stackgen_e637515a-f2e2-5f78-95b7-1968fa8e30e7_id" { + value = module.stackgen_e637515a-f2e2-5f78-95b7-1968fa8e30e7.id + sensitive = false +} + +output "aws_subnet_stackgen_b814f8b2-25ff-5e10-8114-0e2b5fbd6f7f_arn" { + value = module.stackgen_b814f8b2-25ff-5e10-8114-0e2b5fbd6f7f.arn + sensitive = false +} + +output "aws_subnet_stackgen_b814f8b2-25ff-5e10-8114-0e2b5fbd6f7f_id" { + value = module.stackgen_b814f8b2-25ff-5e10-8114-0e2b5fbd6f7f.id + sensitive = false +} + +output "aws_vpc_stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897_arn" { + value = module.stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897.arn + sensitive = false +} + +output "aws_vpc_stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897_default_route_table_id" { + value = module.stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897.default_route_table_id + sensitive = false +} + +output "aws_vpc_stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897_id" { + value = module.stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897.id + sensitive = false +} + +output "aws_vpc_stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897_vpc_id" { + value = module.stackgen_b2d2c07b-8b8b-5d2b-adf6-5172e54cb897.vpc_id + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_architecture" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.architecture + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_arn" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.arn + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_block_device_mappings" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.block_device_mappings + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_boot_mode" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.boot_mode + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_creation_date" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.creation_date + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_deprecation_time" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.deprecation_time + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_description" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.description + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_ena_support" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.ena_support + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_hypervisor" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.hypervisor + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_id" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.id + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_image_id" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.image_id + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_image_location" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.image_location + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_image_owner_alias" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.image_owner_alias + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_image_type" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.image_type + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_imds_support" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.imds_support + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_kernel_id" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.kernel_id + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_name" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.name + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_owner_id" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.owner_id + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_platform" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.platform + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_platform_details" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.platform_details + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_product_codes" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.product_codes + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_public" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.public + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_ramdisk_id" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.ramdisk_id + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_root_device_name" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.root_device_name + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_root_device_type" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.root_device_type + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_root_snapshot_id" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.root_snapshot_id + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_sriov_net_support" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.sriov_net_support + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_state" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.state + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_state_reason" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.state_reason + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_tags" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.tags + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_tpm_support" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.tpm_support + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_usage_operation" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.usage_operation + sensitive = false +} + +output "data_aws_ami_stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32_virtualization_type" { + value = module.stackgen_24f8806f-b0aa-52ec-a594-8e88072f2d32.virtualization_type + sensitive = false +} + diff --git a/testdir-234221/terraform/provider.tf b/testdir-234221/terraform/provider.tf new file mode 100644 index 0000000..f411dbd --- /dev/null +++ b/testdir-234221/terraform/provider.tf @@ -0,0 +1,23 @@ +terraform { + required_version = ">= 1.0.0, < 2.0.0" + + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.0" + } + + awscc = { // AWS Cloud Control + source = "hashicorp/awscc" + version = "~> 1.0" + } + } +} + +provider "awscc" { + region = var.region +} + +provider "aws" { + region = var.region +} diff --git a/testdir-234221/terraform/variables.tf b/testdir-234221/terraform/variables.tf new file mode 100644 index 0000000..60fa06c --- /dev/null +++ b/testdir-234221/terraform/variables.tf @@ -0,0 +1,4 @@ +variable "region" { + description = "AWS region in which the project needs to be setup (us-east-1, ca-west-1, eu-west-3, etc)" +} +