class GeoEngineer::Resources::AwsApiGatewayRestApi
AwsCloudTrail is the api_gatewat_rest_api
terrform resource,
{www.terraform.io/docs/providers/aws/r/api_gateway_rest_api.html}
Attributes
api_resources[RW]
API Resource Methods
Public Class Methods
_fetch_remote_resources(provider)
click to toggle source
# File lib/geoengineer/resources/aws_api_gateway_rest_api.rb, line 76 def self._fetch_remote_resources(provider) _fetch_remote_rest_apis(provider) end
Public Instance Methods
all_api_resources()
click to toggle source
# File lib/geoengineer/resources/aws_api_gateway_rest_api.rb, line 36 def all_api_resources [self, @api_resources.values.map(&:values)].flatten end
all_core_api_resources()
click to toggle source
# File lib/geoengineer/resources/aws_api_gateway_rest_api.rb, line 40 def all_core_api_resources [ self, @api_resources["aws_api_gateway_integration"].values, @api_resources["aws_api_gateway_integration_response"].values, @api_resources["aws_api_gateway_method"].values, @api_resources["aws_api_gateway_method_response"].values, @api_resources["aws_api_gateway_model"].values, @api_resources["aws_api_gateway_resource"].values ].flatten end
delete_uncodified_children_resoures()
click to toggle source
This method will tag for deletion all remote resources that are not codeified
# File lib/geoengineer/resources/aws_api_gateway_rest_api.rb, line 70 def delete_uncodified_children_resoures # Find all remote resources for this rest_api # Compare with api_resources hash # create resource in project tagged with deletion (this will only add them to tfstate) end
initialize_children_resources()
click to toggle source
# File lib/geoengineer/resources/aws_api_gateway_rest_api.rb, line 21 def initialize_children_resources # { <class_name> : { <resource_id> : <resource>} @api_resources = { "aws_api_gateway_authorizer" => {}, "aws_api_gateway_base_path_mapping" => {}, "aws_api_gateway_deployment" => {}, "aws_api_gateway_integration" => {}, "aws_api_gateway_integration_response" => {}, "aws_api_gateway_method" => {}, "aws_api_gateway_method_response" => {}, "aws_api_gateway_model" => {}, "aws_api_gateway_resource" => {} } end
root_resource_id()
click to toggle source
# File lib/geoengineer/resources/aws_api_gateway_rest_api.rb, line 57 def root_resource_id NullObject.maybe(remote_resource).root_resource_id end
to_terraform_state()
click to toggle source
Calls superclass method
GeoEngineer::Resource#to_terraform_state
# File lib/geoengineer/resources/aws_api_gateway_rest_api.rb, line 61 def to_terraform_state tfstate = super tfstate[:primary][:attributes] = { "root_resource_id" => root_resource_id } tfstate end