├── CODEOWNERS ├── .gitattributes ├── .gitmodules ├── CHANGELOG.md ├── linode ├── account │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── profile │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── regions │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_filter_by_country.gotf │ │ ├── data_filter_by_status.gotf │ │ └── data_filter_by_capabilities.gotf ├── lkeversions │ └── tmpl │ │ ├── data_no_tier.gotf │ │ ├── data_tier.gotf │ │ └── template.go ├── accountlogins │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_filter_by_ip.gotf │ │ ├── data_filter_by_status.gotf │ │ ├── data_filter_by_username.gotf │ │ └── data_filter_by_restricted.gotf ├── accountsettings │ └── tmpl │ │ ├── basic.gotf │ │ ├── data_basic.gotf │ │ └── updates.gotf ├── databaseengines │ └── tmpl │ │ ├── data_all.gotf │ │ ├── data_by_engine.gotf │ │ └── template.go ├── image │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_replicate.gotf │ │ ├── no_replica_regions.gotf │ │ ├── upload.gotf │ │ ├── replicate.gotf │ │ └── updates.gotf ├── kernel │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── objendpoints │ └── tmpl │ │ ├── basic.gotf │ │ ├── filter.gotf │ │ └── template.go ├── ipv6range │ └── tmpl │ │ ├── no_id.gotf │ │ ├── data_basic.gotf │ │ ├── basic.gotf │ │ ├── route_target.gotf │ │ └── race_condition.gotf ├── region │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── sshkey │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── basic.gotf │ │ └── updates.gotf ├── sshkeys │ └── tmpl │ │ ├── data_all.gotf │ │ ├── data_base.gotf │ │ ├── data_filter_empty.gotf │ │ ├── data_basic.gotf │ │ └── data_filter.gotf ├── user │ └── tmpl │ │ ├── data_nouser.gotf │ │ ├── data_grants.gotf │ │ ├── basic.gotf │ │ ├── data_basic.gotf │ │ └── grants.gotf ├── kernels │ └── tmpl │ │ ├── data_base.gotf │ │ ├── data_basic.gotf │ │ └── data_filter_empty.gotf ├── lkeversion │ └── tmpl │ │ ├── data_no_tier.gotf │ │ ├── data_tier.gotf │ │ └── template.go ├── objkey │ └── tmpl │ │ ├── basic.gotf │ │ ├── updates.gotf │ │ └── all_regions.gotf ├── accountavailabilities │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_filter_by_region.gotf │ │ └── template.go ├── accountlogin │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── databasemysqlconfig │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── firewallsettings │ └── tmpl │ │ ├── data.gotf │ │ └── basic.gotf ├── firewalltemplates │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_filter.gotf │ │ └── template.go ├── helper │ ├── constant.go │ ├── util.go │ ├── normalize.go │ ├── regex.go │ ├── frameworkfilter │ │ └── filter_test.go │ ├── stateupgrade │ │ └── rfc3339.go │ └── version.go ├── instancetype │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── objcluster │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── databasepostgresqlconfig │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── objquota │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── vpc │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── updates.gotf │ │ ├── data_dual_stack.gotf │ │ ├── basic.gotf │ │ └── dual_stack.gotf ├── firewalltemplate │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── firewall │ └── tmpl │ │ ├── nb.gotf │ │ ├── data_basic.gotf │ │ ├── no_rules.gotf │ │ ├── minimum.gotf │ │ ├── inst.gotf │ │ ├── no_ipv6.gotf │ │ └── no_device.gotf ├── accountavailability │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── domain │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_byid.gotf │ │ ├── ips_update.gotf │ │ ├── ips.gotf │ │ ├── basic.gotf │ │ ├── updates.gotf │ │ ├── zero_sec.gotf │ │ └── rounded_sec.gotf ├── firewalldevice │ └── tmpl │ │ ├── detached.gotf │ │ ├── instance.gotf │ │ ├── basic.gotf │ │ └── with_nodebalancer.gotf ├── acceptance │ └── tmpl │ │ ├── provider_no_poll.gotf │ │ └── template.go ├── volume │ └── tmpl │ │ ├── resized.gotf │ │ ├── basic.gotf │ │ ├── data_basic.gotf │ │ ├── updates.gotf │ │ ├── updates_tags_case_change.gotf │ │ ├── data_with_block_storage_encryption.gotf │ │ └── attached.gotf ├── domains │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_api_filter.gotf │ │ ├── data_filter.gotf │ │ └── data_base.gotf ├── lke │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_autoscaler.gotf │ │ ├── data_enterprise.gotf │ │ ├── data_control_plane.gotf │ │ ├── data_taints_labels.gotf │ │ ├── no_count.gotf │ │ ├── labelled_pools.gotf │ │ ├── updates.gotf │ │ ├── autoscaler.gotf │ │ ├── autoscaler_no_count.gotf │ │ ├── many_pools.gotf │ │ ├── autoscaler_updates.gotf │ │ ├── tier_conditional.gotf │ │ ├── acl_disabled_addresses_disallowed.gotf │ │ ├── basic.gotf │ │ ├── complex_pools.gotf │ │ ├── apl.gotf │ │ ├── autoscaler_many_pools.gotf │ │ └── control_plane.gotf ├── nb │ └── tmpl │ │ ├── data_vpc.gotf │ │ ├── data_basic.gotf │ │ ├── data_firewalls.gotf │ │ ├── firewall_updates.gotf │ │ ├── basic.gotf │ │ └── updates.gotf ├── objbucket │ └── tmpl │ │ ├── force_delete_empty.gotf │ │ ├── endpoint_url.gotf │ │ ├── endpoint_type.gotf │ │ ├── basic.gotf │ │ ├── updates.gotf │ │ ├── cluster_data_basic.gotf │ │ ├── access.gotf │ │ ├── force_delete.gotf │ │ ├── cert.gotf │ │ ├── data_basic.gotf │ │ ├── versioning.gotf │ │ └── temp_keys.gotf ├── token │ └── tmpl │ │ ├── basic.gotf │ │ ├── updates.gotf │ │ ├── recreate_new_scopes.gotf │ │ └── recreate_new_expiry_date.gotf ├── nbtypes │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── nbvpcs │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_filter.gotf │ │ └── template.go ├── databasemysqlv2 │ └── tmpl │ │ ├── data.gotf │ │ ├── data_engine_config.gotf │ │ ├── basic.gotf │ │ ├── suspension.gotf │ │ ├── fork.gotf │ │ ├── complex.gotf │ │ ├── engine_config_nullable_field.gotf │ │ └── vpc_0.gotf ├── placementgroup │ └── tmpl │ │ ├── data_basic.gotf │ │ └── basic.gotf ├── producerimagesharegroup │ └── tmpl │ │ ├── basic.gotf │ │ └── data_basic.gotf ├── volumetypes │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── firewalls │ └── tmpl │ │ ├── data_all.gotf │ │ ├── template.go │ │ └── data_filter.gotf ├── instanceconfig │ └── tmpl │ │ ├── empty_instance.gotf │ │ ├── basic.gotf │ │ ├── instance_disk.gotf │ │ ├── vpc.gotf │ │ ├── booted.gotf │ │ ├── device_named_block.gotf │ │ ├── device_block.gotf │ │ └── instance_disk_with_swap.gotf ├── lketypes │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── databasemysql │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── basic.gotf │ │ ├── complex_updates.gotf │ │ └── complex.gotf ├── domainzonefile │ └── tmpl │ │ ├── basic.gotf │ │ └── template.go ├── nbnode │ └── tmpl │ │ ├── vpc.gotf │ │ ├── data_basic.gotf │ │ ├── networking.gotf │ │ ├── data_vpc.gotf │ │ ├── basic.gotf │ │ └── updates.gotf ├── lkeclusters │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_filter.gotf │ │ └── data_base.gotf ├── vpcs │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_dual_stack.gotf │ │ └── data_filter_label.gotf ├── maintenancepolicies │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── nbs │ └── tmpl │ │ ├── data_filter.gotf │ │ ├── data_basic.gotf │ │ ├── data_filter_empty.gotf │ │ ├── data_order.gotf │ │ ├── data_filter_tags.gotf │ │ └── data_base.gotf ├── databasepostgresql │ └── tmpl │ │ ├── data_basic.gotf │ │ └── basic.gotf ├── instancetypes │ └── tmpl │ │ ├── data_regex.gotf │ │ ├── data_substring.gotf │ │ ├── data_basic.gotf │ │ ├── data_by_class.gotf │ │ └── template.go ├── networktransferprices │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── databasepostgresqlv2 │ └── tmpl │ │ ├── data.gotf │ │ ├── basic.gotf │ │ ├── data_engine_config.gotf │ │ ├── suspension.gotf │ │ ├── fork.gotf │ │ ├── engine_config_update.gotf │ │ ├── complex.gotf │ │ └── vpc_0.gotf ├── instance │ └── tmpl │ │ └── templates │ │ ├── raw_disk_deleted.gotf │ │ ├── type_change_warm.gotf │ │ ├── data_multiple.gotf │ │ ├── data_multiple_base.gotf │ │ ├── data_multiple_regex.gotf │ │ ├── power_state_noimage.gotf │ │ ├── disk_encryption.gotf │ │ ├── type_change_disk.gotf │ │ ├── raw_disk.gotf │ │ ├── no_image.gotf │ │ ├── tag.gotf │ │ ├── raw_disk_expanded.gotf │ │ ├── type_change_disk_none.gotf │ │ ├── authorized_keys_empty.gotf │ │ ├── watchdog_disabled.gotf │ │ ├── data_explicit_interface_generation.gotf │ │ ├── tag_update.gotf │ │ ├── basic.gotf │ │ ├── with_type.gotf │ │ ├── tag_update_case_change.gotf │ │ ├── vpu.gotf │ │ ├── many_linodes.gotf │ │ ├── with_swapsize.gotf │ │ ├── userdata.gotf │ │ ├── private_networking.gotf │ │ ├── interfaces.gotf │ │ ├── firewall_on_creation.gotf │ │ ├── updates.gotf │ │ ├── disk.gotf │ │ ├── power_state.gotf │ │ ├── disk_authorized_keys_empty.gotf │ │ ├── interfaces_update_empty.gotf │ │ ├── maintenance_policy.gotf │ │ ├── data_with_block_storage_encryption.gotf │ │ ├── explicit_interface_generation.gotf │ │ ├── ipv4_sharing.gotf │ │ ├── disk_boot_image.gotf │ │ ├── interfaces_update.gotf │ │ ├── ipv4_sharing_empty.gotf │ │ ├── type_change_disk_explicit.gotf │ │ ├── ipv4_sharing_bad_input.gotf │ │ ├── power_state_interface.gotf │ │ ├── data_multiple_order.gotf │ │ ├── config_updates.gotf │ │ ├── disk_multiple.gotf │ │ ├── instance_with_reserved_ip.gotf │ │ ├── multiple_configs.gotf │ │ ├── authorized_users.gotf │ │ ├── with_pg.gotf │ │ ├── public_interface.gotf │ │ └── data_clientfilter.gotf ├── users │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_substring.gotf │ │ ├── data_clientfilter.gotf │ │ └── data_base.gotf ├── volumes │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── vpcsubnet │ └── tmpl │ │ ├── data_dual_stack.gotf │ │ ├── data_basic.gotf │ │ ├── basic.gotf │ │ ├── updates.gotf │ │ ├── attached.gotf │ │ └── dual_stack.gotf ├── objquotas │ └── tmpl │ │ ├── template.go │ │ └── data_filter.gotf ├── childaccounts │ └── tmpl │ │ ├── template.go │ │ └── data_basic.gotf ├── domainrecord │ └── tmpl │ │ ├── a_noname.gotf │ │ ├── aaaa_noname.gotf │ │ ├── with_domain.gotf │ │ ├── caa_noname.gotf │ │ ├── basic.gotf │ │ ├── updates.gotf │ │ ├── ttl.gotf │ │ ├── srv.gotf │ │ ├── data_id.gotf │ │ ├── data_caa.gotf │ │ ├── data_basic.gotf │ │ └── data_srv.gotf ├── images │ └── tmpl │ │ ├── data_latest_empty.gotf │ │ ├── data_substring.gotf │ │ ├── data_order.gotf │ │ ├── data_latest.gotf │ │ ├── data_basic.gotf │ │ └── data_clientfilter.gotf ├── childaccount │ ├── tmpl │ │ ├── data_basic.gotf │ │ └── template.go │ └── framework_datasource_schema.go ├── nbconfig │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── proxy_protocol.gotf │ │ ├── basic.gotf │ │ ├── ssl.gotf │ │ └── updates.gotf ├── databases │ └── tmpl │ │ ├── by_engine.gotf │ │ └── by_label.gotf ├── stackscript │ └── tmpl │ │ ├── basic.gotf │ │ ├── data_basic.gotf │ │ └── code_change.gotf ├── networkingips │ └── tmpl │ │ ├── data_list.gotf │ │ ├── data_filter.gotf │ │ └── template.go ├── nbconfigs │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_filter.gotf │ │ └── template.go ├── consumerimagesharegrouptoken │ └── tmpl │ │ ├── data_basic.gotf │ │ └── basic.gotf ├── lock │ └── tmpl │ │ ├── basic.gotf │ │ └── data_basic.gotf ├── instancedisk │ └── tmpl │ │ └── basic.gotf ├── instancenetworking │ └── tmpl │ │ ├── data_basic.gotf │ │ ├── data_basic_reserved.gotf │ │ └── data_vpc.gotf ├── nbvpc │ └── tmpl │ │ ├── data_basic.gotf │ │ └── template.go ├── linodeinterface │ └── tmpl │ │ ├── public_default_ip.gotf │ │ ├── public_empty_ip_objects.gotf │ │ ├── vlan_basic.gotf │ │ ├── public_basic.gotf │ │ ├── public_ipv4.gotf │ │ └── public_ipv6.gotf ├── instanceip │ └── tmpl │ │ ├── no_boot.gotf │ │ └── basic.gotf ├── producerimagesharegroupmember │ └── tmpl │ │ └── data_basic.gotf ├── databasebackups │ └── tmpl │ │ ├── template.go │ │ └── data_basic.gotf ├── ipv6ranges │ └── tmpl │ │ └── template.go ├── locks │ └── tmpl │ │ ├── data_basic.gotf │ │ └── data_filter.gotf ├── databasemysqlbackups │ └── tmpl │ │ ├── template.go │ │ └── data_basic.gotf ├── placementgroups │ └── tmpl │ │ └── template.go ├── producerimagesharegroups │ └── tmpl │ │ └── template.go ├── databaseaccesscontrols │ └── tmpl │ │ ├── mysql.gotf │ │ └── postgresql.gotf ├── networkingipassignment │ ├── tmpl │ │ └── template.go │ └── framework_resource_model.go ├── rdns │ └── tmpl │ │ ├── deleted.gotf │ │ ├── basic.gotf │ │ ├── changed.gotf │ │ ├── with_timeout.gotf │ │ └── with_timeout_updated.gotf ├── obj │ └── tmpl │ │ └── temp_keys.gotf ├── instancereservedipassignment │ └── tmpl │ │ └── template.go ├── consumerimagesharegrouptokens │ └── tmpl │ │ └── template.go ├── stackscripts │ └── tmpl │ │ ├── data_basic.gotf │ │ └── data_substring.gotf ├── networkingip │ └── tmpl │ │ ├── reserved_assigned.gotf │ │ └── data_basic.gotf ├── placementgroupassignment │ └── tmpl │ │ ├── template.go │ │ └── basic.gotf ├── consumerimagesharegroup │ └── tmpl │ │ └── template.go ├── vpcsubnets │ └── tmpl │ │ ├── data_filter_label.gotf │ │ └── data_dual_stack.gotf └── producerimagesharegroupmembers │ └── tmpl │ └── template.go ├── version └── version.go ├── examples ├── obj_static_site │ ├── index.html │ ├── outputs.tf │ └── variable.tf ├── lke_echo_server │ ├── outputs.tf │ ├── providers.tf │ └── variable.tf └── mysql_adminer │ └── outputs.tf ├── .github ├── CODE_OF_CONDUCT.md ├── SUPPORT.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── dependencies_review.yml ├── .markdownlint.yml ├── .gitignore ├── EARLY_ACCESS.md └── tools └── tools.go /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @linode/dx 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sh text eol=lf -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "e2e_scripts"] 2 | path = e2e_scripts 3 | url = https://github.com/linode/dx-e2e-test-scripts 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Release notes for this project are kept here: https://github.com/linode/terraform-provider-linode/releases 2 | -------------------------------------------------------------------------------- /linode/account/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "account_data_basic" }} 2 | 3 | data "linode_account" "foo" {} 4 | 5 | {{ end }} -------------------------------------------------------------------------------- /linode/profile/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "profile_data_basic" }} 2 | 3 | data "linode_profile" "user" {} 4 | 5 | {{ end }} -------------------------------------------------------------------------------- /linode/regions/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "regions_data_basic" }} 2 | 3 | data "linode_regions" "foobar" {} 4 | 5 | {{ end }} -------------------------------------------------------------------------------- /version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | // ProviderVersion is set at build-time in the release process 4 | var ProviderVersion = "dev" 5 | -------------------------------------------------------------------------------- /linode/lkeversions/tmpl/data_no_tier.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_versions_data_no_tier" }} 2 | 3 | data "linode_lke_versions" "foobar" {} 4 | 5 | {{ end }} -------------------------------------------------------------------------------- /linode/accountlogins/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "account_logins_data_basic" }} 2 | 3 | data "linode_account_logins" "foobar" {} 4 | 5 | {{ end }} -------------------------------------------------------------------------------- /linode/accountsettings/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "account_settings_basic" }} 2 | 3 | resource "linode_account_settings" "foobar" {} 4 | 5 | {{ end }} -------------------------------------------------------------------------------- /linode/databaseengines/tmpl/data_all.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_engines_data_all" }} 2 | 3 | data "linode_database_engines" "foobar" {} 4 | 5 | {{ end }} -------------------------------------------------------------------------------- /linode/image/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "image_data_basic" }} 2 | 3 | data "linode_image" "foobar" { 4 | id = "{{.ID}}" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/accountsettings/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "account_settings_data_basic" }} 2 | 3 | data "linode_account_settings" "foobar" {} 4 | 5 | {{ end }} -------------------------------------------------------------------------------- /linode/kernel/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "kernel_data_basic" }} 2 | 3 | data "linode_kernel" "foobar" { 4 | id = "{{.ID}}" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/objendpoints/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "objendpoints_data_basic" }} 2 | 3 | data "linode_object_storage_endpoints" "test" {} 4 | 5 | {{ end }} 6 | -------------------------------------------------------------------------------- /linode/ipv6range/tmpl/no_id.gotf: -------------------------------------------------------------------------------- 1 | {{ define "ipv6range_no_id" }} 2 | 3 | resource "linode_ipv6_range" "foobar" { 4 | prefix_length = 64 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/region/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "region_data_basic" }} 2 | 3 | data "linode_region" "foobar" { 4 | id = "{{.Region}}" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/sshkey/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "sshkey_data_basic" }} 2 | 3 | data "linode_sshkey" "foobar" { 4 | label = "{{.Label}}" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/sshkeys/tmpl/data_all.gotf: -------------------------------------------------------------------------------- 1 | {{ define "ssh_keys_all" }} 2 | 3 | {{ template "ssh_keys_base" . }} 4 | 5 | data "linode_sshkeys" "keys" {} 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/user/tmpl/data_nouser.gotf: -------------------------------------------------------------------------------- 1 | {{ define "user_data_nouser" }} 2 | 3 | data "linode_user" "user" { 4 | username = "does-not-exist" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/kernels/tmpl/data_base.gotf: -------------------------------------------------------------------------------- 1 | {{ define "kernels_data_base" }} 2 | 3 | data "linode_kernel" "kernel" { 4 | count = 1 5 | id = "{{.Id}}" 6 | } 7 | 8 | {{ end }} -------------------------------------------------------------------------------- /linode/lkeversion/tmpl/data_no_tier.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_version_data_no_tier" }} 2 | 3 | data "linode_lke_version" "foobar" { 4 | id = "{{.ID}}" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/objkey/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "object_key_basic" }} 2 | 3 | resource "linode_object_storage_key" "foobar" { 4 | label = "{{.Label}}" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/accountavailabilities/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "account_availabilities_data_basic" }} 2 | 3 | data "linode_account_availabilities" "foobar" {} 4 | 5 | {{ end }} -------------------------------------------------------------------------------- /linode/accountlogin/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "account_login_data_basic" }} 2 | 3 | data "linode_account_login" "foobar" { 4 | id = "{{.ID}}" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/databasemysqlconfig/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_mysql_config_data_basic" }} 2 | 3 | data "linode_database_mysql_config" "foobar" {} 4 | 5 | {{ end }} 6 | -------------------------------------------------------------------------------- /linode/firewallsettings/tmpl/data.gotf: -------------------------------------------------------------------------------- 1 | {{ define "data_linode_firewall_settings" }} 2 | 3 | data "linode_firewall_settings" "{{ .DataSourceName }}" { 4 | } 5 | 6 | {{ end }} -------------------------------------------------------------------------------- /linode/firewalltemplates/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "data_linode_firewall_templates_basic" }} 2 | 3 | data "linode_firewall_templates" "test" { 4 | } 5 | 6 | {{ end }} 7 | -------------------------------------------------------------------------------- /linode/helper/constant.go: -------------------------------------------------------------------------------- 1 | package helper 2 | 3 | const ( 4 | TIME_FORMAT = "2006-01-02T15:04:05Z" 5 | 6 | APIVersionV4 = "v4" 7 | APIVersionV4Beta = "v4beta" 8 | ) 9 | -------------------------------------------------------------------------------- /linode/instancetype/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_type_data_basic" }} 2 | 3 | data "linode_instance_type" "foobar" { 4 | id = "{{.ID}}" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/lkeversions/tmpl/data_tier.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_versions_data_tier" }} 2 | 3 | data "linode_lke_versions" "foobar" { 4 | tier = "{{.Tier}}" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/objcluster/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "obj_cluster_data_basic" }} 2 | 3 | data "linode_object_storage_cluster" "foobar" { 4 | id = "{{.ID}}" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/objkey/tmpl/updates.gotf: -------------------------------------------------------------------------------- 1 | {{ define "object_key_updates" }} 2 | 3 | resource "linode_object_storage_key" "foobar" { 4 | label = "{{.Label}}_renamed" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /examples/obj_static_site/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | :) 5 | 6 | 7 |

Provisioned by Terraform!

8 | 9 | -------------------------------------------------------------------------------- /linode/sshkey/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "sshkey_basic" }} 2 | 3 | resource "linode_sshkey" "foobar" { 4 | label = "{{.Label}}" 5 | ssh_key = "{{.SSHKey}}" 6 | } 7 | 8 | {{ end }} -------------------------------------------------------------------------------- /linode/databasepostgresqlconfig/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_postgresql_config_data_basic" }} 2 | 3 | data "linode_database_postgresql_config" "foobar" {} 4 | 5 | {{ end }} 6 | -------------------------------------------------------------------------------- /linode/objquota/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "object_quota_data_basic" }} 2 | 3 | data "linode_object_storage_quota" "foobar" { 4 | quota_id = "{{ .QuotaID }}" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/vpc/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "vpc_data_basic" }} 2 | 3 | {{ template "vpc_basic" . }} 4 | 5 | data "linode_vpc" "foo" { 6 | id = linode_vpc.foobar.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/vpc/tmpl/updates.gotf: -------------------------------------------------------------------------------- 1 | {{ define "vpc_updates" }} 2 | 3 | resource "linode_vpc" "foobar" { 4 | label = "{{.Label}}-renamed" 5 | region = "{{.Region}}" 6 | } 7 | 8 | {{ end }} -------------------------------------------------------------------------------- /linode/firewalltemplate/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "data_linode_firewall_template_basic" }} 2 | 3 | data "linode_firewall_template" "test" { 4 | slug = "public" 5 | } 6 | 7 | {{ end }} 8 | -------------------------------------------------------------------------------- /linode/lkeversion/tmpl/data_tier.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_version_data_tier" }} 2 | 3 | data "linode_lke_version" "foobar" { 4 | id = "{{.ID}}" 5 | tier = "{{.Tier}}" 6 | } 7 | 8 | {{ end }} -------------------------------------------------------------------------------- /linode/firewall/tmpl/nb.gotf: -------------------------------------------------------------------------------- 1 | {{ define "firewall_nb" }} 2 | 3 | resource "linode_nodebalancer" "{{.ID}}" { 4 | label = "{{.Prefix}}-{{.ID}}" 5 | region = "{{ .Region }}" 6 | } 7 | 8 | {{ end }} -------------------------------------------------------------------------------- /linode/sshkey/tmpl/updates.gotf: -------------------------------------------------------------------------------- 1 | {{ define "sshkey_updates" }} 2 | 3 | resource "linode_sshkey" "foobar" { 4 | label = "{{.Label}}_renamed" 5 | ssh_key = "{{.SSHKey}}" 6 | } 7 | 8 | {{ end }} -------------------------------------------------------------------------------- /examples/obj_static_site/outputs.tf: -------------------------------------------------------------------------------- 1 | output "website-url" { 2 | value = "http://${linode_object_storage_bucket.website.label}.website-${linode_object_storage_bucket.website.cluster}.linodeobjects.com/" 3 | } -------------------------------------------------------------------------------- /linode/accountavailability/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "account_availability_data_basic" }} 2 | 3 | data "linode_account_availability" "foobar" { 4 | region = "{{.Region}}" 5 | } 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/domain/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domain_data_basic" }} 2 | 3 | {{ template "domain_basic" . }} 4 | 5 | data "linode_domain" "foobar" { 6 | domain = "{{.Domain}}" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/firewalldevice/tmpl/detached.gotf: -------------------------------------------------------------------------------- 1 | {{ define "firewall_device_detached" }} 2 | 3 | {{ template "firewall_device_firewall" . }} 4 | 5 | {{ template "firewall_device_instance" . }} 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /linode/vpc/tmpl/data_dual_stack.gotf: -------------------------------------------------------------------------------- 1 | {{ define "vpc_data_dual_stack" }} 2 | 3 | {{ template "vpc_dual_stack" . }} 4 | 5 | data "linode_vpc" "foo" { 6 | id = linode_vpc.foobar.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/acceptance/tmpl/provider_no_poll.gotf: -------------------------------------------------------------------------------- 1 | {{ define "provider_no_poll" }} 2 | 3 | provider "linode" { 4 | skip_instance_delete_poll = true 5 | skip_instance_ready_poll = true 6 | } 7 | 8 | {{ end }} -------------------------------------------------------------------------------- /linode/domain/tmpl/data_byid.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domain_data_byid" }} 2 | 3 | {{ template "domain_basic" . }} 4 | 5 | data "linode_domain" "foobar" { 6 | id = "${linode_domain.foobar.id}" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/user/tmpl/data_grants.gotf: -------------------------------------------------------------------------------- 1 | {{ define "data_grants" }} 2 | 3 | {{ template "user_grants" . }} 4 | 5 | data "linode_user" "test" { 6 | username = "${linode_user.test.username}" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/volume/tmpl/resized.gotf: -------------------------------------------------------------------------------- 1 | {{ define "volume_resized" }} 2 | 3 | resource "linode_volume" "foobar" { 4 | label = "{{.Label}}" 5 | region = "{{ .Region }}" 6 | size = 30 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/firewall/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "firewall_data_basic" }} 2 | 3 | {{ template "firewall_basic" . }} 4 | 5 | data "linode_firewall" "test" { 6 | id = linode_firewall.test.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/image/tmpl/data_replicate.gotf: -------------------------------------------------------------------------------- 1 | {{ define "image_data_replicate" }} 2 | 3 | {{ template "image_replicate" . }} 4 | 5 | data "linode_image" "foobar" { 6 | id = linode_image.foobar.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/volume/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "volume_basic" }} 2 | 3 | resource "linode_volume" "foobar" { 4 | label = "{{.Label}}" 5 | region = "{{ .Region }}" 6 | tags = ["tf_test"] 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/volume/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "volume_data_basic" }} 2 | 3 | {{ template "volume_basic" . }} 4 | 5 | data "linode_volume" "foobar" { 6 | id = "${linode_volume.foobar.id}" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/vpc/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "vpc_basic" }} 2 | 3 | resource "linode_vpc" "foobar" { 4 | label = "{{.Label}}" 5 | region = "{{.Region}}" 6 | description = "some description" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/domains/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domains_data_basic" }} 2 | 3 | {{ template "domains_data_base" . }} 4 | 5 | data "linode_domains" "foo" { 6 | depends_on = [linode_domain.bar] 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/lke/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_cluster_data_basic" }} 2 | 3 | {{ template "lke_cluster_basic" . }} 4 | 5 | data "linode_lke_cluster" "test" { 6 | id = linode_lke_cluster.test.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/nb/tmpl/data_vpc.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nodebalancer_data_vpc" }} 2 | 3 | {{ template "nodebalancer_vpc" . }} 4 | 5 | data "linode_nodebalancer" "test" { 6 | id = linode_nodebalancer.test.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/objbucket/tmpl/force_delete_empty.gotf: -------------------------------------------------------------------------------- 1 | {{ define "object_bucket_force_delete_empty" }} 2 | 3 | provider "linode" { 4 | obj_use_temp_keys = true 5 | obj_bucket_force_delete = true 6 | } 7 | 8 | {{ end }} 9 | -------------------------------------------------------------------------------- /linode/sshkeys/tmpl/data_base.gotf: -------------------------------------------------------------------------------- 1 | {{ define "ssh_keys_base" }} 2 | 3 | resource "linode_sshkey" "key" { 4 | count = 2 5 | label = "{{.Label}}-${count.index}" 6 | ssh_key = "{{.SSHKey}}" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/user/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "user_basic" }} 2 | 3 | resource "linode_user" "test" { 4 | username = "{{.Username}}" 5 | email = "{{.Email}}" 6 | restricted = {{.Restricted}} 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/user/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "user_data_basic" }} 2 | 3 | data "linode_profile" "user" {} 4 | 5 | data "linode_user" "user" { 6 | username = "${data.linode_profile.user.username}" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/helper/util.go: -------------------------------------------------------------------------------- 1 | package helper 2 | 3 | import "log" 4 | 5 | func Must[T any](result T, err error) T { 6 | if err != nil { 7 | log.Fatalf("helper.Must failed: %s", err) 8 | } 9 | 10 | return result 11 | } 12 | -------------------------------------------------------------------------------- /linode/ipv6range/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "ipv6range_data_basic" }} 2 | 3 | {{ template "ipv6range_basic" . }} 4 | 5 | data "linode_ipv6_range" "foobar" { 6 | range = linode_ipv6_range.foobar.range 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/token/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "token_basic" }} 2 | 3 | resource "linode_token" "foobar" { 4 | label = "{{.Label}}" 5 | scopes = "linodes:read_only" 6 | expiry = "2100-01-02T03:04:05Z" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/lke/tmpl/data_autoscaler.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_cluster_data_autoscaler" }} 2 | 3 | {{ template "lke_cluster_autoscaler" . }} 4 | 5 | data "linode_lke_cluster" "test" { 6 | id = linode_lke_cluster.test.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/lke/tmpl/data_enterprise.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_cluster_data_enterprise" }} 2 | 3 | {{ template "lke_cluster_enterprise" . }} 4 | 5 | data "linode_lke_cluster" "test" { 6 | id = linode_lke_cluster.test.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/nb/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nodebalancer_data_basic" }} 2 | 3 | {{ template "nodebalancer_basic" . }} 4 | 5 | data "linode_nodebalancer" "foobar" { 6 | id = "${linode_nodebalancer.foobar.id}" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/volume/tmpl/updates.gotf: -------------------------------------------------------------------------------- 1 | {{ define "volume_updates" }} 2 | 3 | resource "linode_volume" "foobar" { 4 | label = "{{.Label}}_r" 5 | region = "{{ .Region }}" 6 | tags = ["tf_test", "tf_test_2"] 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/nbtypes/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nb_types_data_basic" }} 2 | 3 | data "linode_nb_types" "foobar" { 4 | filter { 5 | name = "label" 6 | values = ["NodeBalancer"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/nbvpcs/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nbvpcs_data_basic" }} 2 | 3 | {{ template "nbvpc_data_base" . }} 4 | 5 | data "linode_nodebalancer_vpcs" "test" { 6 | nodebalancer_id = linode_nodebalancer.test.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/token/tmpl/updates.gotf: -------------------------------------------------------------------------------- 1 | {{ define "token_updates" }} 2 | 3 | resource "linode_token" "foobar" { 4 | label = "{{.Label}}_renamed" 5 | scopes = "linodes:read_only" 6 | expiry = "2100-01-02T03:04:05Z" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/lke/tmpl/data_control_plane.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_cluster_data_control_plane" }} 2 | 3 | {{ template "lke_cluster_control_plane" . }} 4 | 5 | data "linode_lke_cluster" "test" { 6 | id = linode_lke_cluster.test.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/nb/tmpl/data_firewalls.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nodebalancer_data_firewalls" }} 2 | 3 | {{ template "nodebalancer_firewall" . }} 4 | 5 | data "linode_nodebalancer" "foobar" { 6 | id = "${linode_nodebalancer.foobar.id}" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/accountlogins/tmpl/data_filter_by_ip.gotf: -------------------------------------------------------------------------------- 1 | {{ define "account_logins_data_filter_by_ip" }} 2 | 3 | data "linode_account_logins" "foobar" { 4 | filter { 5 | name = "ip" 6 | values = ["{{ .IP }}"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/databasemysqlv2/tmpl/data.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_mysql_v2_data" }} 2 | 3 | {{ template "database_mysql_v2_complex" . }} 4 | 5 | data "linode_database_mysql_v2" "foobar" { 6 | id = linode_database_mysql_v2.foobar.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/placementgroup/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "placement_group_data_basic" }} 2 | 3 | {{ template "placement_group_basic" .}} 4 | 5 | data "linode_placement_group" "test" { 6 | id = linode_placement_group.foobar.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/producerimagesharegroup/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "producer_image_share_group_basic" }} 2 | 3 | resource "linode_producer_image_share_group" "foobar" { 4 | label = "{{.Label}}" 5 | description = "{{.Description}}" 6 | } 7 | 8 | {{ end }} -------------------------------------------------------------------------------- /linode/regions/tmpl/data_filter_by_country.gotf: -------------------------------------------------------------------------------- 1 | {{ define "regions_data_filter_by_country" }} 2 | 3 | data "linode_regions" "foobar" { 4 | filter { 5 | name = "country" 6 | values = ["{{ .Country }}"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/regions/tmpl/data_filter_by_status.gotf: -------------------------------------------------------------------------------- 1 | {{ define "regions_data_filter_by_status" }} 2 | 3 | data "linode_regions" "foobar" { 4 | filter { 5 | name = "status" 6 | values = ["{{ .Status }}"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/token/tmpl/recreate_new_scopes.gotf: -------------------------------------------------------------------------------- 1 | {{ define "token_recreate_new_scopes" }} 2 | 3 | resource "linode_token" "foobar" { 4 | label = "{{.Label}}" 5 | scopes = "{{.Scopes}}" 6 | expiry = "2100-01-02T03:04:05Z" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/volumetypes/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "volume_types_data_basic" }} 2 | 3 | data "linode_volume_types" "foobar" { 4 | filter { 5 | name = "label" 6 | values = ["Storage Volume"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/firewalls/tmpl/data_all.gotf: -------------------------------------------------------------------------------- 1 | {{ define "data_linode_firewalls_all" }} 2 | 3 | {{ template "data_linode_firewalls_base" . }} 4 | 5 | data "linode_firewalls" "test" { 6 | depends_on = [linode_firewall.foobar] 7 | } 8 | 9 | {{ end }} 10 | -------------------------------------------------------------------------------- /linode/instanceconfig/tmpl/empty_instance.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_config_empty_instance" }} 2 | 3 | resource "linode_instance" "foobar" { 4 | label = "{{ .Label }}" 5 | type = "g6-nanode-1" 6 | region = "{{ .Region }}" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/lketypes/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_types_data_basic" }} 2 | 3 | data "linode_lke_types" "foobar" { 4 | filter { 5 | name = "label" 6 | values = ["LKE Standard Availability"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/token/tmpl/recreate_new_expiry_date.gotf: -------------------------------------------------------------------------------- 1 | {{ define "token_recreate_new_expiry_date" }} 2 | 3 | resource "linode_token" "foobar" { 4 | label = "{{.Label}}" 5 | scopes = "linodes:read_only" 6 | expiry = "{{.Expiry}}" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | HashiCorp Community Guidelines apply to you when interacting with the community here on GitHub and contributing code. 4 | 5 | Please read the full text at https://www.hashicorp.com/community-guidelines 6 | -------------------------------------------------------------------------------- /linode/databasemysql/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_mysql_data_basic" }} 2 | 3 | {{ template "database_mysql_complex" . }} 4 | 5 | data "linode_database_mysql" "foobar" { 6 | database_id = linode_database_mysql.foobar.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/domainzonefile/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domain_zonefile_basic" }} 2 | 3 | {{ template "domain_basic" .Domain }} 4 | 5 | data "linode_domain_zonefile" "foobar" { 6 | domain_id = "${linode_domain.foobar.id}" 7 | } 8 | 9 | {{ end }} 10 | -------------------------------------------------------------------------------- /linode/lke/tmpl/data_taints_labels.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_cluster_data_taints_labels" }} 2 | 3 | {{ template "lke_cluster_taints_labels" . }} 4 | 5 | data "linode_lke_cluster" "test" { 6 | id = linode_lke_cluster.test.id 7 | } 8 | 9 | {{ end }} 10 | -------------------------------------------------------------------------------- /linode/nbnode/tmpl/vpc.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nodebalancer_node_vpc" }} 2 | 3 | provider "linode" { 4 | skip_instance_ready_poll = true 5 | skip_instance_delete_poll = true 6 | } 7 | 8 | {{ template "nodebalancer_node_vpc_base" . }} 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /.github/SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support 2 | 3 | Terraform is a mature project with a growing community. There are active, dedicated people willing to help you through various mediums. 4 | 5 | Take a look at those mediums listed at https://www.terraform.io/community.html 6 | -------------------------------------------------------------------------------- /linode/databaseengines/tmpl/data_by_engine.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_engines_data_by_engine" }} 2 | 3 | data "linode_database_engines" "foobar" { 4 | filter { 5 | name = "engine" 6 | values = ["mysql"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/firewalltemplates/tmpl/data_filter.gotf: -------------------------------------------------------------------------------- 1 | {{ define "data_linode_firewall_templates_filter" }} 2 | 3 | data "linode_firewall_templates" "test" { 4 | filter { 5 | name = "slug" 6 | values = ["{{ .Slug }}"] 7 | } 8 | } 9 | 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /linode/volume/tmpl/updates_tags_case_change.gotf: -------------------------------------------------------------------------------- 1 | {{ define "volume_updates_tags_case_change" }} 2 | 3 | resource "linode_volume" "foobar" { 4 | label = "{{.Label}}_r" 5 | region = "{{ .Region }}" 6 | tags = ["tf_tEst", "tf_teST_2"] 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/accountlogins/tmpl/data_filter_by_status.gotf: -------------------------------------------------------------------------------- 1 | {{ define "account_logins_data_filter_by_status" }} 2 | 3 | data "linode_account_logins" "foobar" { 4 | filter { 5 | name = "status" 6 | values = ["{{ .Status }}"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/firewall/tmpl/no_rules.gotf: -------------------------------------------------------------------------------- 1 | {{ define "firewall_no_rules" }} 2 | 3 | resource "linode_firewall" "test" { 4 | label = "{{.Label}}" 5 | tags = ["test"] 6 | 7 | inbound_policy = "DROP" 8 | outbound_policy = "DROP" 9 | } 10 | 11 | {{ end }} -------------------------------------------------------------------------------- /linode/lkeclusters/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_clusters_data_basic" }} 2 | 3 | {{ template "lke_clusters_data_base" . }} 4 | 5 | data "linode_lke_clusters" "test" { 6 | depends_on = [linode_lke_cluster.test, linode_lke_cluster.test2] 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/regions/tmpl/data_filter_by_capabilities.gotf: -------------------------------------------------------------------------------- 1 | {{ define "regions_data_filter_by_capabilities" }} 2 | 3 | data "linode_regions" "foobar" { 4 | filter { 5 | name = "capabilities" 6 | values = ["{{ .Capabilities }}"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/vpcs/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "vpcs_data_basic" }} 2 | 3 | {{ template "vpc_basic" . }} 4 | 5 | data "linode_vpcs" "foobar" { 6 | filter { 7 | name = "id" 8 | values = [linode_vpc.foobar.id] 9 | } 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/accountlogins/tmpl/data_filter_by_username.gotf: -------------------------------------------------------------------------------- 1 | {{ define "account_logins_data_filter_by_username" }} 2 | 3 | data "linode_account_logins" "foobar" { 4 | filter { 5 | name = "username" 6 | values = ["{{ .Username }}"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/maintenancepolicies/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "maintenance_policies_data_basic" }} 2 | 3 | data "linode_maintenance_policies" "foobar" { 4 | filter { 5 | name = "slug" 6 | values = ["linode/migrate"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/objbucket/tmpl/endpoint_url.gotf: -------------------------------------------------------------------------------- 1 | {{ define "object_bucket_endpoint_url" }} 2 | 3 | resource "linode_object_storage_bucket" "foobar" { 4 | label = "{{ .Label }}" 5 | region = "{{ .Region }}" 6 | s3_endpoint = "{{ .EndpointURL }}" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/nbs/tmpl/data_filter.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nbs_data_filter" }} 2 | 3 | {{ template "nbs_data_base" . }} 4 | 5 | data "linode_nodebalancers" "nbs" { 6 | filter { 7 | name = "label" 8 | values = ["{{.Label}}-0"] 9 | } 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/objendpoints/tmpl/filter.gotf: -------------------------------------------------------------------------------- 1 | {{ define "objendpoints_data_filter" }} 2 | 3 | data "linode_object_storage_endpoints" "test" { 4 | filter { 5 | name = "endpoint_type" 6 | values = ["{{ .EndpointType }}"] 7 | } 8 | } 9 | 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /linode/accountavailabilities/tmpl/data_filter_by_region.gotf: -------------------------------------------------------------------------------- 1 | {{ define "account_availabilities_data_by_region" }} 2 | 3 | data "linode_account_availabilities" "foobar" { 4 | filter { 5 | name = "region" 6 | values = ["{{ .Region }}"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/accountlogins/tmpl/data_filter_by_restricted.gotf: -------------------------------------------------------------------------------- 1 | {{ define "account_logins_data_filter_by_restricted" }} 2 | 3 | data "linode_account_logins" "foobar" { 4 | filter { 5 | name = "restricted" 6 | values = ["{{ .Restricted }}"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/databasemysql/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_mysql_basic" }} 2 | 3 | resource "linode_database_mysql" "foobar" { 4 | engine_id = "{{.Engine}}" 5 | label = "{{.Label}}" 6 | region = "{{ .Region }}" 7 | type = "g6-nanode-1" 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/databasemysqlv2/tmpl/data_engine_config.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_mysql_v2_data_engine_config" }} 2 | 3 | {{ template "database_mysql_v2_engine_config" . }} 4 | 5 | data "linode_database_mysql_v2" "foobar" { 6 | id = linode_database_mysql_v2.foobar.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/databasepostgresql/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_postgresql_data_basic" }} 2 | 3 | {{ template "database_postgresql_complex" . }} 4 | 5 | data "linode_database_postgresql" "foobar" { 6 | database_id = linode_database_postgresql.foobar.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/instancetypes/tmpl/data_regex.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_types_data_regex" }} 2 | 3 | data "linode_instance_types" "foobar" { 4 | filter { 5 | name = "label" 6 | values = ["Dedicated .*"] 7 | match_by = "re" 8 | } 9 | } 10 | 11 | {{ end }} -------------------------------------------------------------------------------- /linode/networktransferprices/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "network_transfer_prices_data_basic" }} 2 | 3 | data "linode_network_transfer_prices" "foobar" { 4 | filter { 5 | name = "label" 6 | values = ["Network Transfer"] 7 | } 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/vpcs/tmpl/data_dual_stack.gotf: -------------------------------------------------------------------------------- 1 | {{ define "vpcs_data_dual_stack" }} 2 | 3 | {{ template "vpc_dual_stack" . }} 4 | 5 | data "linode_vpcs" "foobar" { 6 | filter { 7 | name = "id" 8 | values = [linode_vpc.foobar.id] 9 | } 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /.markdownlint.yml: -------------------------------------------------------------------------------- 1 | # Configuration for markdownlint 2 | # https://github.com/DavidAnson/markdownlint#configuration 3 | default: true 4 | 5 | # Disabled Rules 6 | # https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md 7 | line-length: false 8 | fenced-code-language: false 9 | -------------------------------------------------------------------------------- /linode/databasepostgresqlv2/tmpl/data.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_postgresql_v2_data" }} 2 | 3 | {{ template "database_postgresql_v2_complex" . }} 4 | 5 | data "linode_database_postgresql_v2" "foobar" { 6 | id = linode_database_postgresql_v2.foobar.id 7 | } 8 | 9 | {{ end }} 10 | -------------------------------------------------------------------------------- /linode/domain/tmpl/ips_update.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domain_ips_updates" }} 2 | 3 | resource "linode_domain" "foobar" { 4 | domain = "{{.Domain}}" 5 | type = "master" 6 | soa_email = "example@{{.Domain}}" 7 | master_ips = [] 8 | axfr_ips = [] 9 | } 10 | 11 | {{ end }} -------------------------------------------------------------------------------- /linode/domains/tmpl/data_api_filter.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domains_data_api_filter" }} 2 | 3 | {{ template "domains_data_base" . }} 4 | 5 | data "linode_domains" "foo" { 6 | filter { 7 | name = "domain" 8 | values = ["{{.Domain}}"] 9 | } 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/instance/tmpl/templates/raw_disk_deleted.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_raw_disk_deleted" }} 2 | 3 | resource "linode_instance" "foobar" { 4 | label = "{{.Label}}" 5 | group = "tf_test" 6 | type = "g6-nanode-1" 7 | region = "{{ .Region }}" 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/instanceconfig/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_config_basic" }} 2 | 3 | {{ template "instance_config_empty_instance" . }} 4 | 5 | resource "linode_instance_config" "foobar" { 6 | linode_id = linode_instance.foobar.id 7 | label = "my-config" 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/objbucket/tmpl/endpoint_type.gotf: -------------------------------------------------------------------------------- 1 | {{ define "object_bucket_endpoint_type" }} 2 | 3 | resource "linode_object_storage_bucket" "foobar" { 4 | region = "{{ .Region }}" 5 | label = "{{ .Label }}" 6 | endpoint_type = "{{ .EndpointType }}" 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/users/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "users_data_basic" }} 2 | 3 | {{ template "users_data_base" .}} 4 | 5 | data "linode_users" "user" { 6 | filter { 7 | name = "username" 8 | values = [data.linode_user.test.username] 9 | } 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/vpcs/tmpl/data_filter_label.gotf: -------------------------------------------------------------------------------- 1 | {{ define "vpcs_data_filter_label" }} 2 | 3 | {{ template "vpc_basic" . }} 4 | 5 | data "linode_vpcs" "foobar" { 6 | filter { 7 | name = "label" 8 | values = [linode_vpc.foobar.label] 9 | } 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/databasemysqlv2/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_mysql_v2_basic" }} 2 | 3 | resource "linode_database_mysql_v2" "foobar" { 4 | label = "{{.Label}}" 5 | region = "{{ .Region }}" 6 | type = "g6-nanode-1" 7 | engine_id = "{{ .EngineID }}" 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/instancetypes/tmpl/data_substring.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_types_data_substring" }} 2 | 3 | data "linode_instance_types" "foobar" { 4 | filter { 5 | name = "label" 6 | values = ["Linode"] 7 | match_by = "substring" 8 | } 9 | } 10 | 11 | {{ end }} -------------------------------------------------------------------------------- /linode/kernels/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "kernels_data_basic" }} 2 | 3 | {{ template "kernels_data_base" .}} 4 | 5 | data "linode_kernels" "kernels" { 6 | filter { 7 | name = "id" 8 | values = [data.linode_kernel.kernel.0.id] 9 | } 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/nbs/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nbs_data_basic" }} 2 | 3 | {{ template "nbs_data_base" . }} 4 | 5 | data "linode_nodebalancers" "nbs" { 6 | filter { 7 | name = "label" 8 | values = [linode_nodebalancer.foobar.0.label] 9 | } 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/nbs/tmpl/data_filter_empty.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nbs_data_filter_empty" }} 2 | 3 | {{ template "nbs_data_base" . }} 4 | 5 | data "linode_nodebalancers" "nbs" { 6 | filter { 7 | name = "region" 8 | values = ["not-a-real-region"] 9 | } 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/sshkeys/tmpl/data_filter_empty.gotf: -------------------------------------------------------------------------------- 1 | {{ define "ssh_keys_filter_empty" }} 2 | 3 | {{ template "ssh_keys_base" . }} 4 | 5 | data "linode_sshkeys" "keys" { 6 | filter { 7 | name = "label" 8 | values = ["bad-label"] 9 | } 10 | 11 | } 12 | 13 | {{ end }} -------------------------------------------------------------------------------- /linode/volumes/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "volumes_data_basic" }} 2 | 3 | {{ template "volume_basic" . }} 4 | 5 | data "linode_volumes" "volume" { 6 | filter { 7 | name = "label" 8 | values = [linode_volume.foobar.label] 9 | } 10 | } 11 | 12 | {{ end }} 13 | -------------------------------------------------------------------------------- /linode/databasepostgresql/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_postgresql_basic" }} 2 | 3 | resource "linode_database_postgresql" "foobar" { 4 | engine_id = "{{.Engine}}" 5 | label = "{{.Label}}" 6 | region = "{{ .Region }}" 7 | type = "g6-nanode-1" 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/domain/tmpl/ips.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domain_ips" }} 2 | 3 | resource "linode_domain" "foobar" { 4 | domain = "{{.Domain}}" 5 | type = "master" 6 | soa_email = "example@{{.Domain}}" 7 | master_ips = ["12.34.56.78"] 8 | axfr_ips = ["87.65.43.21"] 9 | } 10 | 11 | {{ end }} -------------------------------------------------------------------------------- /linode/kernels/tmpl/data_filter_empty.gotf: -------------------------------------------------------------------------------- 1 | {{ define "kernels_data_filter_empty" }} 2 | 3 | {{ template "kernels_data_base" . }} 4 | 5 | data "linode_kernels" "kernels" { 6 | filter { 7 | name = "label" 8 | values = ["not-real-label"] 9 | } 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/nb/tmpl/firewall_updates.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nodebalancer_firewall_updates" }} 2 | 3 | resource "linode_nodebalancer" "foobar" { 4 | label = "{{.Label}}_r" 5 | region = "{{ .Region }}" 6 | client_conn_throttle = 0 7 | tags = ["tf_test", "tf_test_2"] 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/vpcsubnet/tmpl/data_dual_stack.gotf: -------------------------------------------------------------------------------- 1 | {{ define "vpc_subnet_data_dual_stack" }} 2 | 3 | {{ template "vpc_subnet_dual_stack" . }} 4 | 5 | data "linode_vpc_subnet" "foo" { 6 | vpc_id = linode_vpc_subnet.foobar.vpc_id 7 | id = linode_vpc_subnet.foobar.id 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/lketypes/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | func DataBasic(t testing.TB) string { 10 | return acceptance.ExecuteTemplate(t, 11 | "lke_types_data_basic", nil) 12 | } 13 | -------------------------------------------------------------------------------- /linode/nbtypes/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | func DataBasic(t testing.TB) string { 10 | return acceptance.ExecuteTemplate(t, 11 | "nb_types_data_basic", nil) 12 | } 13 | -------------------------------------------------------------------------------- /linode/producerimagesharegroup/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "producer_image_share_group_data_basic" }} 2 | 3 | {{ template "producer_image_share_group_basic" .}} 4 | 5 | data "linode_producer_image_share_group" "foobar" { 6 | id = linode_producer_image_share_group.foobar.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/databasepostgresqlv2/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_postgresql_v2_basic" }} 2 | 3 | resource "linode_database_postgresql_v2" "foobar" { 4 | label = "{{.Label}}" 5 | region = "{{ .Region }}" 6 | type = "g6-nanode-1" 7 | engine_id = "{{ .EngineID }}" 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/databasepostgresqlv2/tmpl/data_engine_config.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_postgresql_v2_data_engine_config" }} 2 | 3 | {{ template "database_postgresql_v2_engine_config" . }} 4 | 5 | data "linode_database_postgresql_v2" "foobar" { 6 | id = linode_database_postgresql_v2.foobar.id 7 | } 8 | 9 | {{ end }} -------------------------------------------------------------------------------- /linode/firewalldevice/tmpl/instance.gotf: -------------------------------------------------------------------------------- 1 | # Template instance for use with firewall devices 2 | 3 | {{ define "firewall_device_instance" }} 4 | 5 | resource "linode_instance" "foobar" { 6 | label = "{{.Label}}" 7 | type = "g6-nanode-1" 8 | region = "{{ .Region }}" 9 | } 10 | 11 | {{ end }} -------------------------------------------------------------------------------- /linode/instancetypes/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_types_data_basic" }} 2 | 3 | data "linode_instance_types" "foobar" { 4 | order_by = "vcpus" 5 | order = "desc" 6 | 7 | filter { 8 | name = "label" 9 | values = ["Linode 4GB"] 10 | } 11 | } 12 | 13 | {{ end }} -------------------------------------------------------------------------------- /linode/objquotas/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | func DataBasic(t testing.TB) string { 10 | return acceptance.ExecuteTemplate(t, "object_storage_quotas_basic", nil) 11 | } 12 | -------------------------------------------------------------------------------- /linode/childaccounts/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | func DataBasic(t testing.TB) string { 10 | return acceptance.ExecuteTemplate(t, 11 | "child_accounts_data_basic", nil) 12 | } 13 | -------------------------------------------------------------------------------- /linode/domainrecord/tmpl/a_noname.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domain_record_a_noname" }} 2 | 3 | {{ template "domain_basic" .Domain }} 4 | 5 | resource "linode_domain_record" "foobar" { 6 | domain_id = "${linode_domain.foobar.id}" 7 | record_type = "A" 8 | target = "192.168.1.1" 9 | } 10 | 11 | {{ end }} -------------------------------------------------------------------------------- /linode/objbucket/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "object_bucket_basic" }} 2 | 3 | resource "linode_object_storage_bucket" "foobar" { 4 | {{if .Region }} 5 | region = "{{.Region}}" 6 | {{else}} 7 | cluster = "{{ .Cluster }}" 8 | {{end}} 9 | label = "{{.Label}}" 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/volumetypes/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | func DataBasic(t testing.TB) string { 10 | return acceptance.ExecuteTemplate(t, 11 | "volume_types_data_basic", nil) 12 | } 13 | -------------------------------------------------------------------------------- /linode/domain/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domain_basic" }} 2 | 3 | resource "linode_domain" "foobar" { 4 | domain = "{{.Domain}}" 5 | type = "master" 6 | status = "active" 7 | soa_email = "example@{{.Domain}}" 8 | description = "tf-testing" 9 | tags = ["tf_test"] 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/domainrecord/tmpl/aaaa_noname.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domain_record_aaaa_noname" }} 2 | 3 | {{ template "domain_basic" .Domain }} 4 | 5 | resource "linode_domain_record" "foobar" { 6 | domain_id = "${linode_domain.foobar.id}" 7 | record_type = "AAAA" 8 | target = "2400:3f00::22" 9 | } 10 | 11 | {{ end }} -------------------------------------------------------------------------------- /linode/images/tmpl/data_latest_empty.gotf: -------------------------------------------------------------------------------- 1 | {{ define "images_data_latest_empty" }} 2 | 3 | {{ template "images_data_base" . }} 4 | 5 | data "linode_images" "foobar" { 6 | latest = true 7 | 8 | filter { 9 | name = "label" 10 | values = ["not-a-real-image"] 11 | } 12 | } 13 | 14 | {{ end }} -------------------------------------------------------------------------------- /linode/objbucket/tmpl/updates.gotf: -------------------------------------------------------------------------------- 1 | {{ define "object_bucket_updates" }} 2 | 3 | resource "linode_object_storage_bucket" "foobar" { 4 | {{if .Region }} 5 | region = "{{.Region}}" 6 | {{else}} 7 | cluster = "{{ .Cluster }}" 8 | {{end}} 9 | label = "{{.Label}}-renamed" 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /examples/lke_echo_server/outputs.tf: -------------------------------------------------------------------------------- 1 | output "loadbalancer-ip" { 2 | value = local.loadbalancer_ingress.ip 3 | } 4 | 5 | output "loadbalancer-hostname" { 6 | value = local.loadbalancer_ingress.hostname 7 | } 8 | 9 | output "echo-service-endpoint" { 10 | value = "http://${local.loadbalancer_ingress.ip}/" 11 | } 12 | -------------------------------------------------------------------------------- /linode/childaccount/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "child_account_data_basic" }} 2 | 3 | data "linode_child_accounts" "all" {} 4 | 5 | data "linode_child_account" "foo" { 6 | depends_on = [data.linode_child_accounts.all] 7 | euuid = data.linode_child_accounts.all.child_accounts[0].euuid 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/databasemysqlconfig/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | func DataBasic(t testing.TB) string { 10 | return acceptance.ExecuteTemplate(t, 11 | "database_mysql_config_data_basic", nil) 12 | } 13 | -------------------------------------------------------------------------------- /linode/maintenancepolicies/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | func DataBasic(t testing.TB) string { 10 | return acceptance.ExecuteTemplate(t, 11 | "maintenance_policies_data_basic", nil) 12 | } 13 | -------------------------------------------------------------------------------- /linode/objquotas/tmpl/data_filter.gotf: -------------------------------------------------------------------------------- 1 | {{ define "object_storage_quotas_basic" }} 2 | 3 | data "linode_object_storage_quotas" "all" {} 4 | 5 | data "linode_object_storage_quotas" "by-endpoint-type" { 6 | filter { 7 | name = "endpoint_type" 8 | values = ["E0"] 9 | } 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/users/tmpl/data_substring.gotf: -------------------------------------------------------------------------------- 1 | {{ define "users_data_substring" }} 2 | 3 | {{ template "users_data_base" .}} 4 | 5 | data "linode_users" "user" { 6 | filter { 7 | name = "username" 8 | values = [linode_user.test.username] 9 | match_by = "substring" 10 | } 11 | } 12 | 13 | {{ end }} -------------------------------------------------------------------------------- /linode/vpc/tmpl/dual_stack.gotf: -------------------------------------------------------------------------------- 1 | {{ define "vpc_dual_stack" }} 2 | 3 | resource "linode_vpc" "foobar" { 4 | label = "{{.Label}}" 5 | region = "{{.Region}}" 6 | description = "some description" 7 | 8 | ipv6 = [ 9 | { 10 | range = "/52" 11 | } 12 | ] 13 | } 14 | 15 | {{ end }} -------------------------------------------------------------------------------- /linode/networktransferprices/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | func DataBasic(t testing.TB) string { 10 | return acceptance.ExecuteTemplate(t, 11 | "network_transfer_prices_data_basic", nil) 12 | } 13 | -------------------------------------------------------------------------------- /linode/account/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | type TemplateData struct{} 10 | 11 | func DataBasic(t testing.TB) string { 12 | return acceptance.ExecuteTemplate(t, 13 | "account_data_basic", nil) 14 | } 15 | -------------------------------------------------------------------------------- /linode/databasepostgresqlconfig/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | func DataBasic(t testing.TB) string { 10 | return acceptance.ExecuteTemplate(t, 11 | "database_postgresql_config_data_basic", nil) 12 | } 13 | -------------------------------------------------------------------------------- /linode/domainrecord/tmpl/with_domain.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domain_record_with_domain" }} 2 | 3 | {{ template "domain_basic" .Domain }} 4 | 5 | resource "linode_domain_record" "foobar" { 6 | domain_id = linode_domain.foobar.id 7 | name = "{{.Record}}" 8 | record_type = "A" 9 | target = "0.0.0.0" 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/nbconfig/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nodebalancer_config_data_basic" }} 2 | 3 | {{ template "nodebalancer_config_basic" . }} 4 | 5 | data "linode_nodebalancer_config" "foofig" { 6 | id = "${linode_nodebalancer_config.foofig.id}" 7 | nodebalancer_id = "${linode_nodebalancer.foobar.id}" 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/placementgroup/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "placement_group_basic" }} 2 | 3 | resource "linode_placement_group" "foobar" { 4 | label = "{{.Label}}" 5 | region = "{{.Region}}" 6 | placement_group_type = "{{.PlacementGroupType}}" 7 | placement_group_policy = "{{.PlacementGroupPolicy}}" 8 | } 9 | 10 | {{ end }} -------------------------------------------------------------------------------- /linode/profile/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | type TemplateData struct{} 10 | 11 | func DataBasic(t testing.TB) string { 12 | return acceptance.ExecuteTemplate(t, 13 | "profile_data_basic", nil) 14 | } 15 | -------------------------------------------------------------------------------- /linode/domain/tmpl/updates.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domain_updates" }} 2 | 3 | resource "linode_domain" "foobar" { 4 | domain = "renamed-{{.Domain}}" 5 | type = "master" 6 | status = "active" 7 | soa_email = "example@{{.Domain}}" 8 | description = "tf-testing" 9 | tags = ["tf_test", "tf_test_2"] 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/vpcsubnet/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "vpc_subnet_data_basic" }} 2 | 3 | {{ template "vpc_subnet_attached" . }} 4 | 5 | data "linode_vpc_subnet" "foo" { 6 | depends_on = [linode_instance_config.foobar] 7 | 8 | vpc_id = linode_vpc_subnet.foobar.vpc_id 9 | id = linode_vpc_subnet.foobar.id 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/databasemysqlv2/tmpl/suspension.gotf: -------------------------------------------------------------------------------- 1 | {{ define "database_mysql_v2_suspension" }} 2 | 3 | resource "linode_database_mysql_v2" "foobar" { 4 | label = "{{.Label}}" 5 | region = "{{ .Region }}" 6 | type = "{{ .Type }}" 7 | engine_id = "{{ .EngineID }}" 8 | 9 | suspended = {{ .Suspended }} 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/domainrecord/tmpl/caa_noname.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domain_record_caa_noname" }} 2 | 3 | {{ template "domain_basic" .Domain }} 4 | 5 | resource "linode_domain_record" "foobar" { 6 | domain_id = "${linode_domain.foobar.id}" 7 | record_type = "CAA" 8 | target = "target.{{.Record}}" 9 | tag = "issue" 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/image/tmpl/no_replica_regions.gotf: -------------------------------------------------------------------------------- 1 | {{ define "image_no_replica_regions" }} 2 | 3 | resource "linode_image" "foobar" { 4 | label = "{{.Image}}" 5 | file_path = "{{.FilePath}}" 6 | file_hash = filemd5("{{.FilePath}}") 7 | region = "{{ .Region }}" 8 | description = "really descriptive text" 9 | } 10 | 11 | {{ end }} -------------------------------------------------------------------------------- /linode/nbs/tmpl/data_order.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nbs_data_order" }} 2 | 3 | {{ template "nbs_data_base" . }} 4 | 5 | data "linode_nodebalancers" "nbs" { 6 | order_by = "label" 7 | order = "asc" 8 | 9 | filter { 10 | name = "label" 11 | values = ["{{.Label}}-0", "{{.Label}}-1"] 12 | } 13 | } 14 | 15 | {{ end }} -------------------------------------------------------------------------------- /linode/vpcsubnet/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "vpc_subnet_basic" }} 2 | 3 | resource "linode_vpc" "foobar" { 4 | label = "{{.Label}}" 5 | region = "{{.Region}}" 6 | } 7 | 8 | resource "linode_vpc_subnet" "foobar" { 9 | vpc_id = linode_vpc.foobar.id 10 | label = "{{.Label}}" 11 | ipv4 = "{{.IPv4}}" 12 | } 13 | 14 | {{ end }} -------------------------------------------------------------------------------- /linode/childaccount/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | type TemplateData struct{} 10 | 11 | func DataBasic(t testing.TB) string { 12 | return acceptance.ExecuteTemplate(t, 13 | "child_account_data_basic", nil) 14 | } 15 | -------------------------------------------------------------------------------- /linode/databases/tmpl/by_engine.gotf: -------------------------------------------------------------------------------- 1 | {{ define "databases_data_by_engine" }} 2 | 3 | {{ template "database_mysql_basic" .DB }} 4 | 5 | data "linode_databases" "foobar" { 6 | depends_on = [linode_database_mysql.foobar] 7 | 8 | filter { 9 | name = "engine" 10 | values = ["{{.Engine}}"] 11 | } 12 | } 13 | 14 | {{ end }} -------------------------------------------------------------------------------- /linode/databases/tmpl/by_label.gotf: -------------------------------------------------------------------------------- 1 | {{ define "databases_data_by_label" }} 2 | 3 | {{ template "database_mysql_basic" .DB }} 4 | 5 | data "linode_databases" "foobar" { 6 | depends_on = [linode_database_mysql.foobar] 7 | 8 | filter { 9 | name = "label" 10 | values = ["{{.Label}}"] 11 | } 12 | } 13 | 14 | {{ end }} -------------------------------------------------------------------------------- /linode/image/tmpl/upload.gotf: -------------------------------------------------------------------------------- 1 | {{ define "image_upload" }} 2 | 3 | resource "linode_image" "foobar" { 4 | label = "{{.Image}}" 5 | file_path = "{{.FilePath}}" 6 | file_hash = filemd5("{{.FilePath}}") 7 | region = "{{ .Region }}" 8 | description = "really descriptive text" 9 | tags = ["{{.Tag}}"] 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/nbvpcs/tmpl/data_filter.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nbvpcs_data_filter" }} 2 | 3 | {{ template "nbvpc_data_base" . }} 4 | 5 | data "linode_nodebalancer_vpcs" "test" { 6 | nodebalancer_id = linode_nodebalancer.test.id 7 | 8 | filter { 9 | name = "ipv4_range" 10 | values = ["10.0.0.4/30"] 11 | } 12 | } 13 | 14 | {{ end }} -------------------------------------------------------------------------------- /linode/domainrecord/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "domain_record_basic" }} 2 | 3 | {{ template "domain_basic" .Domain }} 4 | 5 | resource "linode_domain_record" "foobar" { 6 | domain_id = "${linode_domain.foobar.id}" 7 | name = "{{.Record}}" 8 | record_type = "CNAME" 9 | target = "target.{{.Record}}.example" 10 | } 11 | 12 | {{ end }} -------------------------------------------------------------------------------- /linode/lke/tmpl/no_count.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_cluster_no_count" }} 2 | 3 | # This is expected to fail 4 | resource "linode_lke_cluster" "test" { 5 | label = "{{.Label}}" 6 | region = "{{ .Region }}" 7 | k8s_version = "{{.K8sVersion}}" 8 | 9 | pool { 10 | type = "g6-standard-1" 11 | } 12 | } 13 | 14 | {{ end }} -------------------------------------------------------------------------------- /linode/stackscript/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "stackscript_basic" }} 2 | 3 | resource "linode_stackscript" "foobar" { 4 | label = "{{.Label}}" 5 | script = < 8 | echo bye 9 | EOF 10 | images = ["linode/ubuntu24.04", "linode/ubuntu22.04"] 11 | description = "tf_test stackscript" 12 | rev_note = "second" 13 | } 14 | 15 | {{ end }} -------------------------------------------------------------------------------- /linode/instance/tmpl/templates/raw_disk_expanded.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_raw_disk_expanded" }} 2 | 3 | {{ template "e2e_test_firewall" . }} 4 | 5 | resource "linode_instance" "foobar" { 6 | label = "{{.Label}}" 7 | group = "tf_test" 8 | type = "g6-standard-1" 9 | region = "{{ .Region }}" 10 | disk { 11 | label = "disk" 12 | size = 6000 13 | } 14 | firewall_id = linode_firewall.e2e_test_firewall.id 15 | } 16 | 17 | {{ end }} -------------------------------------------------------------------------------- /linode/instanceip/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_ip_basic" }} 2 | 3 | resource "linode_instance" "foobar" { 4 | label = "{{.Label}}" 5 | group = "tf_test" 6 | type = "g6-nanode-1" 7 | region = "{{ .Region }}" 8 | image = "linode/debian12" 9 | } 10 | 11 | resource "linode_instance_ip" "test" { 12 | linode_id = linode_instance.foobar.id 13 | public = true 14 | apply_immediately = {{.ApplyImmediately}} 15 | } 16 | 17 | {{ end }} 18 | -------------------------------------------------------------------------------- /linode/databasebackups/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | type TemplateData struct { 10 | Engine string 11 | Label string 12 | BackupLabel string 13 | Region string 14 | } 15 | 16 | func DataBasic(t testing.TB, data TemplateData) string { 17 | return acceptance.ExecuteTemplate(t, 18 | "database_backups_data_basic", data) 19 | } 20 | -------------------------------------------------------------------------------- /linode/images/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "images_data_basic" }} 2 | 3 | {{ template "images_data_base" . }} 4 | 5 | data "linode_images" "foobar" { 6 | filter { 7 | name = "label" 8 | values = [linode_image.foobar.label] 9 | } 10 | 11 | filter { 12 | name = "is_public" 13 | values = ["false"] 14 | } 15 | 16 | filter { 17 | name = "tags" 18 | values = ["test"] 19 | } 20 | } 21 | 22 | {{ end }} -------------------------------------------------------------------------------- /linode/ipv6ranges/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | type TemplateData struct { 10 | Label string 11 | Region string 12 | } 13 | 14 | func DataBasic(t testing.TB, label, region string) string { 15 | return acceptance.ExecuteTemplate(t, 16 | "ipv6ranges_data_basic", TemplateData{ 17 | Label: label, 18 | Region: region, 19 | }) 20 | } 21 | -------------------------------------------------------------------------------- /linode/locks/tmpl/data_basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "locks_data_basic" }} 2 | 3 | resource "linode_instance" "test" { 4 | label = "{{ .Label }}" 5 | region = "{{ .Region }}" 6 | type = "g6-nanode-1" 7 | } 8 | 9 | resource "linode_lock" "test" { 10 | entity_id = linode_instance.test.id 11 | entity_type = "linode" 12 | lock_type = "{{ .LockType }}" 13 | } 14 | 15 | data "linode_locks" "test" { 16 | depends_on = [ linode_lock.test ] 17 | } 18 | 19 | {{ end }} 20 | -------------------------------------------------------------------------------- /linode/instance/tmpl/templates/type_change_disk_none.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_type_change_disk_none" }} 2 | 3 | {{ template "e2e_test_firewall" . }} 4 | 5 | resource "linode_instance" "foobar" { 6 | label = "{{.Label}}" 7 | group = "tf_test" 8 | type = "{{.Type}}" 9 | region = "{{ .Region }}" 10 | 11 | {{ if .ResizeDisk }} resize_disk = {{.ResizeDisk}} {{ end }} 12 | 13 | firewall_id = linode_firewall.e2e_test_firewall.id 14 | } 15 | 16 | {{ end }} -------------------------------------------------------------------------------- /linode/instanceconfig/tmpl/booted.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_config_booted" }} 2 | 3 | {{ template "instance_config_empty_instance" . }} 4 | 5 | {{ template "instance_config_disk" . }} 6 | 7 | resource "linode_instance_config" "foobar" { 8 | linode_id = linode_instance.foobar.id 9 | label = "my-config" 10 | 11 | devices { 12 | sda { 13 | disk_id = linode_instance_disk.foobar.id 14 | } 15 | } 16 | 17 | booted = {{ .Booted }} 18 | } 19 | 20 | {{ end }} -------------------------------------------------------------------------------- /linode/nbnode/tmpl/data_vpc.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nodebalancer_node_data_vpc" }} 2 | 3 | provider "linode" { 4 | skip_instance_ready_poll = true 5 | skip_instance_delete_poll = true 6 | } 7 | 8 | {{ template "nodebalancer_node_vpc_base" . }} 9 | 10 | data "linode_nodebalancer_node" "test" { 11 | nodebalancer_id = linode_nodebalancer.test.id 12 | config_id = linode_nodebalancer_config.test.id 13 | id = linode_nodebalancer_node.test.id 14 | } 15 | 16 | {{ end }} -------------------------------------------------------------------------------- /linode/sshkeys/tmpl/data_filter.gotf: -------------------------------------------------------------------------------- 1 | {{ define "ssh_keys_filter" }} 2 | 3 | {{ template "ssh_keys_base" . }} 4 | 5 | data "linode_sshkeys" "keys" { 6 | filter { 7 | name = "label" 8 | values = ["{{.Label}}-0"] 9 | } 10 | 11 | filter { 12 | name = "ssh_key" 13 | values = ["{{.SSHKey}}"] 14 | } 15 | 16 | filter { 17 | name = "id" 18 | values = [linode_sshkey.key[0].id] 19 | } 20 | } 21 | 22 | {{ end }} -------------------------------------------------------------------------------- /linode/databasemysqlbackups/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | type TemplateData struct { 10 | Engine string 11 | Label string 12 | BackupLabel string 13 | Region string 14 | } 15 | 16 | func DataBasic(t testing.TB, data TemplateData) string { 17 | return acceptance.ExecuteTemplate(t, 18 | "database_mysql_backups_data_basic", data) 19 | } 20 | -------------------------------------------------------------------------------- /linode/instance/tmpl/templates/authorized_keys_empty.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_authorized_keys_empty" }} 2 | 3 | {{ template "e2e_test_firewall" . }} 4 | 5 | resource "linode_instance" "foobar" { 6 | label = "{{.Label}}" 7 | group = "tf_test" 8 | type = "g6-nanode-1" 9 | image = "{{.Image}}" 10 | region = "{{ .Region }}" 11 | authorized_keys = [ 12 | "" 13 | ] 14 | firewall_id = linode_firewall.e2e_test_firewall.id 15 | } 16 | 17 | {{ end }} -------------------------------------------------------------------------------- /linode/nbs/tmpl/data_base.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nbs_data_base" }} 2 | 3 | {{ template "e2e_test_firewall" . }} 4 | 5 | resource "linode_nodebalancer" "foobar" { 6 | count = 2 7 | label = "{{.Label}}-${count.index}" 8 | region = "{{.Region}}" 9 | client_conn_throttle = 20 10 | client_udp_sess_throttle = 10 11 | tags = count.index == 0 ? ["tf_test_1"] : ["tf_test_1", "tf_test_2"] 12 | firewall_id = linode_firewall.e2e_test_firewall.id 13 | } 14 | 15 | {{ end }} -------------------------------------------------------------------------------- /linode/placementgroups/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | type TemplateData struct { 10 | Label string 11 | Region string 12 | } 13 | 14 | func DataBasic(t testing.TB, label, region string) string { 15 | return acceptance.ExecuteTemplate(t, 16 | "placement_groups_data_basic", TemplateData{ 17 | Label: label, 18 | Region: region, 19 | }) 20 | } 21 | -------------------------------------------------------------------------------- /.github/workflows/dependencies_review.yml: -------------------------------------------------------------------------------- 1 | name: 'Dependency Review' 2 | on: [pull_request] 3 | 4 | permissions: 5 | contents: read 6 | pull-requests: write 7 | 8 | jobs: 9 | dependency-review: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout Repository 13 | uses: actions/checkout@v6 14 | - name: Dependency Review 15 | uses: actions/dependency-review-action@v4 16 | with: 17 | comment-summary-in-pr: on-failure 18 | -------------------------------------------------------------------------------- /linode/firewalldevice/tmpl/with_nodebalancer.gotf: -------------------------------------------------------------------------------- 1 | {{ define "firewall_device_with_nodebalancer" }} 2 | 3 | {{ template "firewall_device_firewall" . }} 4 | 5 | resource "linode_nodebalancer" "foobar" { 6 | label = "{{.Label}}" 7 | region = "{{.Region}}" 8 | } 9 | 10 | resource "linode_firewall_device" "foobar" { 11 | firewall_id = linode_firewall.foobar.id 12 | entity_id = linode_nodebalancer.foobar.id 13 | entity_type = "nodebalancer" 14 | } 15 | 16 | 17 | {{ end }} -------------------------------------------------------------------------------- /linode/instance/tmpl/templates/watchdog_disabled.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_watchdog_disabled" }} 2 | 3 | {{ template "e2e_test_firewall" . }} 4 | 5 | resource "linode_instance" "foobar" { 6 | label = "{{.Label}}" 7 | region = "{{ .Region }}" 8 | image = "{{.Image}}" 9 | type = "g6-nanode-1" 10 | root_pass = "{{ .RootPass }}" 11 | 12 | watchdog_enabled = false 13 | firewall_id = linode_firewall.e2e_test_firewall.id 14 | } 15 | 16 | {{ end }} -------------------------------------------------------------------------------- /linode/linodeinterface/tmpl/public_empty_ip_objects.gotf: -------------------------------------------------------------------------------- 1 | {{ define "interface_public_empty_ip_objects" }} 2 | 3 | resource "linode_instance" "test" { 4 | label = "{{.Label}}" 5 | region = "{{.Region}}" 6 | type = "g6-nanode-1" 7 | interface_generation = "linode" 8 | } 9 | 10 | resource "linode_interface" "test" { 11 | linode_id = linode_instance.test.id 12 | 13 | public = { 14 | ipv4 = {} 15 | ipv6 = {} 16 | } 17 | } 18 | 19 | {{ end }} -------------------------------------------------------------------------------- /linode/databaseengines/tmpl/template.go: -------------------------------------------------------------------------------- 1 | package tmpl 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/linode/terraform-provider-linode/v3/linode/acceptance" 7 | ) 8 | 9 | type TemplateData struct{} 10 | 11 | func DataAll(t testing.TB) string { 12 | return acceptance.ExecuteTemplate(t, 13 | "database_engines_data_all", nil) 14 | } 15 | 16 | func DataByEngine(t testing.TB) string { 17 | return acceptance.ExecuteTemplate(t, 18 | "database_engines_data_by_engine", nil) 19 | } 20 | -------------------------------------------------------------------------------- /linode/instance/tmpl/templates/data_explicit_interface_generation.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_data_explicit_interface_generation" }} 2 | 3 | {{ template "instance_explicit_interface_generation" . }} 4 | 5 | data "linode_instances" "foobar" { 6 | filter { 7 | name = "id" 8 | values = [linode_instance.foobar.id] 9 | } 10 | 11 | filter { 12 | name = "interface_generation" 13 | values = ["{{ .InterfaceGeneration }}"] 14 | } 15 | } 16 | 17 | {{ end }} -------------------------------------------------------------------------------- /linode/instance/tmpl/templates/tag_update.gotf: -------------------------------------------------------------------------------- 1 | {{ define "instance_tag_update" }} 2 | 3 | {{ template "e2e_test_firewall" . }} 4 | 5 | resource "linode_instance" "foobar" { 6 | label = "{{.Label}}" 7 | tags = ["tf_test", "tf_test_2"] 8 | type = "g6-nanode-1" 9 | region = "{{ .Region }}" 10 | config { 11 | label = "config" 12 | kernel = "linode/latest-64bit" 13 | } 14 | firewall_id = linode_firewall.e2e_test_firewall.id 15 | } 16 | 17 | {{ end }} -------------------------------------------------------------------------------- /linode/ipv6range/tmpl/basic.gotf: -------------------------------------------------------------------------------- 1 | {{ define "ipv6range_basic" }} 2 | 3 | {{ template "e2e_test_firewall" . }} 4 | 5 | resource "linode_instance" "foobar" { 6 | label = "{{.Label}}" 7 | type = "g6-nanode-1" 8 | region = "{{ .Region }}" 9 | booted = false 10 | firewall_id = linode_firewall.e2e_test_firewall.id 11 | } 12 | 13 | resource "linode_ipv6_range" "foobar" { 14 | linode_id = linode_instance.foobar.id 15 | 16 | prefix_length = 64 17 | } 18 | 19 | {{ end }} -------------------------------------------------------------------------------- /linode/lke/tmpl/autoscaler.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_cluster_autoscaler" }} 2 | 3 | resource "linode_lke_cluster" "test" { 4 | label = "{{.Label}}" 5 | region = "{{ .Region }}" 6 | k8s_version = "{{.K8sVersion}}" 7 | tags = ["test"] 8 | tier = "standard" 9 | 10 | pool { 11 | autoscaler { 12 | min = 1 13 | max = 5 14 | } 15 | type = "g6-standard-1" 16 | count = 3 17 | } 18 | } 19 | 20 | {{ end }} -------------------------------------------------------------------------------- /linode/lke/tmpl/autoscaler_no_count.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_cluster_autoscaler_no_count" }} 2 | 3 | # This is expected to fail 4 | resource "linode_lke_cluster" "test" { 5 | label = "{{.Label}}" 6 | region = "{{ .Region }}" 7 | k8s_version = "{{.K8sVersion}}" 8 | tier = "standard" 9 | 10 | pool { 11 | type = "g6-standard-1" 12 | 13 | autoscaler { 14 | min = 2 15 | max = 4 16 | } 17 | } 18 | } 19 | 20 | {{ end }} -------------------------------------------------------------------------------- /linode/lke/tmpl/many_pools.gotf: -------------------------------------------------------------------------------- 1 | {{ define "lke_cluster_many_pools" }} 2 | 3 | resource "linode_lke_cluster" "test" { 4 | label = "{{.Label}}" 5 | region = "{{ .Region }}" 6 | k8s_version = "{{.K8sVersion}}" 7 | tags = ["test"] 8 | tier = "standard" 9 | 10 | pool { 11 | type = "g6-standard-1" 12 | count = 1 13 | } 14 | 15 | pool { 16 | type = "g6-standard-1" 17 | count = 1 18 | } 19 | } 20 | 21 | {{ end }} -------------------------------------------------------------------------------- /linode/nbconfig/tmpl/ssl.gotf: -------------------------------------------------------------------------------- 1 | {{ define "nodebalancer_config_ssl" }} 2 | 3 | {{ template "nodebalancer_basic" .NodeBalancer }} 4 | 5 | resource "linode_nodebalancer_config" "foofig" { 6 | nodebalancer_id = "${linode_nodebalancer.foobar.id}" 7 | port = 8080 8 | protocol = "https" 9 | check = "http" 10 | check_passive = true 11 | check_path = "/" 12 | ssl_cert = <